<template lang="">
    <div class="recommendContainer" style="height: 100%;overflow: auto;">
      <el-dialog
      :close-on-click-modal="false"
      show-close
      :visible.sync="checkApply"
      width="700px"
      @closed="diloagClose"
    >
      <span style="positiin:relative;padding-left:20px;font-size:18px;color:#4787E4;" slot="title"><span style="position:absolute;font-size:28px;left:12px;top:17px;" class="iconfont iconyunxiazai"></span>数据导入</span>
      <div v-loading="smallLoading" style="padding:20px;background-color:#F3F6FA;">
        <div style="padding:20px;background:#ffffff;">
          <el-radio-group v-model="classRadio">
            <el-radio :disabled="!caonimalixin.includes('rankExcel')" label="1">职级表格导入</el-radio>
            <el-radio :disabled="!caonimalixin.includes('permissionsExcel')" label="2">绩效表格导入</el-radio>
            <el-radio :disabled="!caonimalixin.includes('jobTitleExcel')" label="3">职称表格导入</el-radio>
            <el-radio :disabled="!caonimalixin.includes('projectExcel')" label="4">项目表格导入</el-radio>
            <el-radio :disabled="!caonimalixin.includes('patentExcel')"  label="5">专利表格导入</el-radio>
            <el-radio :disabled="!caonimalixin.includes('sixSigmaExcel')" label="6">六西格玛表格导入</el-radio>
            <el-radio :disabled="!caonimalixin.includes('courseExcel')" label="7">课程导入</el-radio>
            <el-radio :disabled="!caonimalixin.includes('teacherExel')" label="8">导师导入</el-radio>
          </el-radio-group>
          <el-form label-width="93px">
            <el-form-item style="margin-top:20px;" label="添加附件：">
              <el-upload
                style="width:300px;"
                class="upload-demo"
                ref="uploads"
                action="#"
                accept=".xlsx, .xls"
                :limit="1"
                :on-exceed="limitNums"
                :on-remove="limitRemoves"
                :on-change="addAttachments"
                :file-list="fileListMenus"
                :auto-upload="false"
              >
                <!-- <i style="padding:0 20px;" slot="trigger" class="el-icon-plus"></i> -->
                <el-button slot="trigger" size="small" type="default">选取文件</el-button>
              </el-upload>
              <P class="text">文件格式（.xlsx,.xls），请保证文件格式正确</P>
            </el-form-item>
          </el-form>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button size="small" :loading="disAgree" @click="checkApply = false">取 消</el-button>
        <!-- <el-button size="small" :loading="agree" type="primary" @click="goDetailModal">确 认</el-button> -->
      </span>
    </el-dialog>
        <el-tabs v-model="activeName" @tab-click="tabClick">
            <!-- 第一个 -->
            <el-tab-pane v-if="menuList.includes('userManage')" name="userManage"  height="72vh">
              <!-- <span slot="label"><i class="el-icon-user-solid"></i> 用户管理</span> -->
              <span slot="label" class="tabPaneStyle"><i class="el-icon-user-solid "></i> 用户管理</span>
                <el-form style="margin-left:60px;margin-top:25px;" :inline="true" :model="userTable" class="demo-form-inline">
                    <el-form-item label="姓名:">
                      <el-input v-model="userTable.name" placeholder="请输入" size="small" class="inputBorder"></el-input>
                    </el-form-item>
                    <el-form-item label="部门:">
                      <el-select v-model="userTable.dept" placeholder="请选择" size="small" clearable>
                          <el-option 
                          v-for="(item,index) in deptTypes"
                          :key="index"
                          :label="item.name" 
                          :value="item.id">
                          </el-option>
                      </el-select>
                    </el-form-item>
                    <el-form-item label="学历:">
                      <el-select v-model="userTable.education" placeholder="请选择" size="small" clearable>
                        <el-option label="大专" :value="0" ></el-option>
                                  <el-option label="本科" :value="1" ></el-option>
                                  <el-option label="硕士" :value="2" ></el-option>
                                  <el-option label="博士" :value="3" ></el-option>
                                  <el-option label="其他" :value="4"></el-option>
                      </el-select>
                    </el-form-item>
                    <el-form-item label="角色:">
                      <el-select v-model="userTable.role" placeholder="请选择" size="small" clearable>
                        <el-option v-for="option in userTableRoleOptions" :key="option.id" :label="option.roleName" :value="option.id" ></el-option>
                      </el-select>
                    </el-form-item>
                    <br>
                    <el-form-item style="float:left">
                        <!-- <el-button type="primary" @click="onDelete" style="background:#4787E3FF">删除</el-button> -->
                    </el-form-item>
                    <el-form-item style="float:right">
                        <el-button type="primary" @click="importFile" size="small" style="background:#4787E3FF;font-size:16px !important;">批量导入</el-button>
                        <el-button type="primary" style="background:#4787E3FF" @click="onSubmit" size="small" class="el-form-item-t">查询</el-button>
                        <!-- <el-button type="primary" @click="onDelete" style="background:#4787E3FF">删除</el-button> -->
                    </el-form-item>
                </el-form>
                <el-table ref="multipleTable" :data="userTable.tableData" tooltip-effect="dark" :header-cell-style="{background:'#4787E3FF',color:'#fff'}" height="72vh" style="width: 100%" row-class-name="greyRow" header-row-class-name="strong" @select="select" @select-all="selectAll" >
                  <!-- <el-table-column type="selection" width="55"></el-table-column> -->
                  <el-table-column prop="username" label="姓名"  align="center"></el-table-column>
                  <!-- <el-table-column prop="deptName" label="部门" align="center">
                  </el-table-column>
                  <el-table-column prop="school" label="学历" align="center">
                  </el-table-column> -->
                  <el-table-column prop="deptTypes" label="部门" width="150" align="center">
                    <template slot-scope="scope">
                      <span
                          v-for="(item,index) in deptTypes"
                          :key="item.id">
                          <span v-if="scope.row.deptId == item.id">{{item.name}}</span>
                          </span>
                    </template>
                  </el-table-column>
                  <el-table-column prop="eduKind" label="学历" width="200" align="center">
                    <template slot-scope="scope">
  <span v-if="scope.row.eduKind == -1"></span>
  <span v-if="scope.row.eduKind == 0">大专</span>
  <span v-if="scope.row.eduKind == 1">本科</span>
  <span v-if="scope.row.eduKind == 2">硕士</span>
  <span v-if="scope.row.eduKind == 3">博士</span>
  <span v-if="scope.row.eduKind == 4">其他</span>
</template>
                  </el-table-column>
                  <el-table-column prop="job" label="岗位"  align="center"></el-table-column>
                  <el-table-column prop="jobTitle" label="职称"  align="center"></el-table-column>
                  <el-table-column v-if="editControl" label="操作" align="center">
                      <template slot-scope="scope">
  <el-button
    @click="userEditDialogtogger('userBaseTab',scope.row)"
    type="text"
    size="medium"
    class="underline"
  >编辑</el-button>
  <!-- <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button> -->
</template>
                  </el-table-column>
                </el-table>
                <!-- 分页 -->
                <el-pagination
                  @current-change="handleCurrentChange"
                  :current-page.sync="userTable.page"
                  :page-size="userTable.pageSize"
                  layout="total, prev, pager, next"
                  background
                  :total="userTable.total"
                  style="float: right;padding:12px 0;">
                </el-pagination>
                <!-- <Look :val="dialogVisible" :menuForm="menuForm"  @getMessage='close'></Look> -->
            </el-tab-pane>
            <!-- 第二个----------------------- -->
            <el-tab-pane v-if="menuList.includes('roleManage')" name="roleManage"  height="72vh">
              <!-- <span slot="label"><i class="el-icon-postcard"></i> 角色管理</span> -->
               <span slot="label" class="tabPaneStyle"><i class="el-icon-postcard "></i> 角色管理</span>
                <el-form style="margin-left:60px;margin-top:25px;" :inline="true" :model="RoleTableForm" class="demo-form-inline">
                    <el-form-item label="角色名称:">
                      <el-input v-model="RoleTableForm.name" placeholder="请输入" size="small" class="inputBorder"></el-input>
                    </el-form-item>
                    <el-form-item label="角色描述:">
                      <el-input v-model="RoleTableForm.description" placeholder="请输入" size="small" class="inputBorder"></el-input>
                    </el-form-item>
                    <br>
                    <el-form-item style="float:left">
                        
                    </el-form-item>
                    <el-form-item style="float:right">
                      <el-button type="primary" style="background:#4787E3FF" @click="showAddRoleDialog" size="small" class="el-form-item-t">新增</el-button>
                      <el-button type="primary" style="background:#4787E3FF" @click="deleteRole(RoleTableForm.selectedIds)" size="small" class="el-form-item-t">删除</el-button>
                        <el-button type="primary" @click="getRolePage" style="background:#4787E3FF" size="small" class="el-form-item-t">查询</el-button>
                        
                    </el-form-item>
                </el-form>
                <el-table ref="multipleTable" :data="RoleTableForm.tableData" tooltip-effect="dark"  :header-cell-style="{background:'#4787E3FF',color:'#fff'}" height="72vh" row-class-name="greyRow" header-row-class-name="strong" @select="roleTableSelect" @select-all="roleTableSelectAll" >
                  <el-table-column type="selection" width="55" align="center"></el-table-column>
                  <el-table-column prop="roleName" label="角色名称" align="center"></el-table-column>
                  <el-table-column prop="description" label="角色描述" align="center"></el-table-column>
                  <el-table-column prop="createTime" label="创建时间" align="center">
                    <template slot-scope="scope">
  <span>{{dateFtt(new Date(scope.row.createTime))}}</span>
</template>
                  </el-table-column>
                  <el-table-column label="操作" align="center">
                      <template slot-scope="scope">
  <!-- <el-button @click="handleClick2(scope.row)" type="text" size="small">查看</el-button> -->
  <el-button
    @click="showEditRoleDialog(scope.row.id)"
    type="text"
    size="medium"
    class="underline"
  >修改</el-button>
  <el-button @click="deleteRole([scope.row.id])" type="text" size="medium" class="underline">删除</el-button>
</template>
                  </el-table-column>
                </el-table>
                <!-- 分页 -->
                <el-pagination
                  @current-change="roleTablePageChange"
                  :current-page.sync="RoleTableForm.page"
                  :page-size="RoleTableForm.size"
                  layout="total, prev, pager, next"
                  background
                  :total="RoleTableForm.totalCount"
                  style="float: right;">
                </el-pagination>
                <!-- 对话框 -->
                <el-dialog title="岗位查看" :visible.sync="dialogVisible2" width="60%">
                  <div class="detailsTip">岗位详细信息</div>
                  <el-form :inline="true" :model="menuForm2" class="demo-form-inline modi-icon" label-position="right" label-width="150px">
                    <el-form-item label="岗位名称" :required="true" >
                      <el-input v-model="menuForm2.name" placeholder="" size="small" ></el-input>
                    </el-form-item>
                    <el-form-item label="类别" :required="true" class="phone">
                       <el-select v-model="menuForm2.kind" placeholder="请选择" size="small" clearable>
                        <el-option label="内部" value="0"></el-option>
                        <el-option label="外部" value="1"></el-option>
                       </el-select>
                    </el-form-item>
                    <el-form-item label="部门名称" :required="true">
                      <el-select v-model="menuForm2.dddeptName" placeholder="请选择" @focus="getDeptInfo" size="small" clearable>
                         <el-option 
                          v-for="(item,index) in deptTypes"
                          :key="index"
                          :label="item.name" 
                          :value="item.id">
                          </el-option>
                       </el-select>                       
                    </el-form-item>
                    <el-form-item label="薪资范围" :required="true">
                      <el-input v-model="menuForm2.fSalary" placeholder="" size="small" style="width:88px;"></el-input>K~                        
                      <el-input v-model="menuForm2.eSalary" placeholder="" size="small" style="width:88px;"></el-input>K                      
                    </el-form-item>
                    <el-form-item label="工作年限" :required="true">
                      <el-select v-model="menuForm2.jobTime" placeholder="请选择" size="small" clearable>
                        <el-option label="1-2" value="1-2"></el-option>
                        <el-option label="3-5" value="3-5"></el-option>
                        <el-option label="6-8" value="6-8"></el-option>
                      </el-select>                                           
                    </el-form-item>
                    <el-form-item label="学历要求" :required="true">
                       <el-select v-model="menuForm2.edu" placeholder="请选择" size="small" clearable>
                        <el-option label="大专" value="0"></el-option>
                        <el-option label="本科" value="1"></el-option>
                        <el-option label="硕士" value="2"></el-option>
                        <el-option label="博士" value="3"></el-option>
                        <el-option label="其他" value="4"></el-option>
                      </el-select>                       
                    </el-form-item>
                    <el-form-item label="是否推荐" :required="true">
                      <el-switch 
                         v-model="menuForm2.svalue3" 
                         @change="changeswitvh(value3)"
                         style="margin-right:163px;"
                         >
                      </el-switch>                      
                    </el-form-item>
                    <el-form-item label="工作城市" :required="true">
                      <el-input v-model="menuForm2.city" placeholder="" size="small" ></el-input>                        
                    </el-form-item>
                    <el-form-item label="职位亮点" :required="true">
                      <el-input v-model="menuForm2.lightPoint" placeholder="请输入" size="small" style="margin-right:363px;"></el-input>                        
                    </el-form-item>
                    <el-form-item label="工作地址" :required="true">
                      <el-input v-model="menuForm2.address" placeholder="请输入" size="small" style="margin-right:363px;"></el-input>                        
                    </el-form-item>
                    <el-form-item label="职位说明" :required="true">
                      <div class="postdec">
                        <el-input v-model="menuForm2.jobDuty" placeholder="请输入岗位职责" size="small" style="margin-right:363px;">    
                        </el-input> 
                      </div>
                      <div class="postdec">
                        <el-input v-model="menuForm2.welfare" placeholder="请输入福利待遇" size="small" style="margin-right:363px;">
                        </el-input> 
                      </div>                                            
                    </el-form-item>
                  </el-form>
                  <span slot="footer" class="dialog-footer">
                    <el-button v-if="isAdd==false&&isModify==false"  @click="closeDialog2" type="primary" size="small" class="el-form-item-t" style="background:#4787E3FF">返回</el-button>
                    <el-button v-if="isAdd==true || isModify==true" @click="dialogVisible2 = false" size="small" class="el-form-item-t">取 消</el-button>
                    <el-button v-if="isAdd==true || isModify==true" type="primary" @click="submitInfo()" size="small" class="el-form-item-t" style="background:#4787E3FF">确 定</el-button>
                  </span>
                </el-dialog>
            </el-tab-pane>
            <el-tab-pane v-if="menuList.includes('imageManage')" name="bannerManage"  height="72vh">
              <span slot="label" class="tabPaneStyle"><i class="el-icon-postcard "></i> 轮播图管理</span>
              <div class="lunbo-size">
                <el-upload
                  :name="'multipartFile'"
                  :action="basePath + '/manage/insertImage'"
                  :file-list="fileList"
                  :on-preview="handlePictureCardPreview"
                  :before-remove="handleRemove"
                  :on-success="qryImageManageList"
                  list-type="picture-card">
                  <el-button plain icon="el-icon-plus"></el-button>
                </el-upload>
                <el-dialog :visible.sync="imgDialogVisible">
                  <img width="100%" :src="dialogImageUrl" alt="">
                </el-dialog>
              </div>
            </el-tab-pane>
        </el-tabs> 
<div class="login-info-box flex-row">
          <div class="picture">
            <img src="@/assets/homePicture/userpicture.png">
          </div>
          <div class="login-info">
              <p>欢迎您，{{userInfoName}}</p>
          </div>
      </div>

        <el-dialog title="" :visible.sync="dialogVisible2" width="60%">
                  <div class="detailsTip">岗位详细信息</div>
                  <el-form :inline="true" :model="menuForm2" class="demo-form-inline modi-icon" label-position="right" label-width="150px">
                    <el-form-item label="岗位名称" :required="true" >
                      <el-input v-model="menuForm2.name" placeholder="" size="small" ></el-input>
                    </el-form-item>
                    <el-form-item label="类别" :required="true" class="phone">
                       <el-select v-model="menuForm2.kind" placeholder="请选择" size="small" clearable>
                        <el-option label="内部" value="0"></el-option>
                        <el-option label="外部" value="1"></el-option>
                       </el-select>
                    </el-form-item>
                    <el-form-item label="部门名称" :required="true">
                      <el-select v-model="menuForm2.dddeptName" placeholder="请选择" @focus="getDeptInfo" size="small" clearable>
                         <el-option 
                          v-for="(item,index) in deptTypes"
                          :key="index"
                          :label="item.name" 
                          :value="item.id">
                          </el-option>
                       </el-select>                       
                    </el-form-item>
                    <el-form-item label="薪资范围" :required="true">
                      <el-input v-model="menuForm2.fSalary" placeholder="" size="small" style="width:88px;"></el-input>K~                        
                      <el-input v-model="menuForm2.eSalary" placeholder="" size="small" style="width:88px;"></el-input>K                      
                    </el-form-item>
                    <el-form-item label="工作年限" :required="true">
                      <el-select v-model="menuForm2.jobTime" placeholder="请选择" size="small" clearable>
                        <el-option label="1-2" value="1-2"></el-option>
                        <el-option label="3-5" value="3-5"></el-option>
                        <el-option label="6-8" value="6-8"></el-option>
                      </el-select>                                           
                    </el-form-item>
                    <el-form-item label="学历要求" :required="true">
                       <el-select v-model="menuForm2.edu" placeholder="请选择" size="small" clearable>
                        <el-option label="大专" value="0"></el-option>
                        <el-option label="本科" value="1"></el-option>
                        <el-option label="硕士" value="2"></el-option>
                        <el-option label="博士" value="3"></el-option>
                        <el-option label="其他" value="4"></el-option>
                      </el-select>                       
                    </el-form-item>
                    <el-form-item label="是否推荐" :required="true">
                      <el-switch 
                         v-model="menuForm2.svalue3" 
                         @change="changeswitvh(value3)"
                         style="margin-right:163px;"
                         >
                      </el-switch>                      
                    </el-form-item>
                    <el-form-item label="工作城市" :required="true">
                      <el-input v-model="menuForm2.city" placeholder="" size="small" ></el-input>                        
                    </el-form-item>
                    <el-form-item label="职位亮点" :required="true">
                      <el-input v-model="menuForm2.lightPoint" placeholder="请输入" size="small" style="margin-right:363px;"></el-input>                        
                    </el-form-item>
                    <el-form-item label="工作地址" :required="true">
                      <el-input v-model="menuForm2.address" placeholder="请输入" size="small" style="margin-right:363px;"></el-input>                        
                    </el-form-item>
                    <el-form-item label="职位说明" :required="true">
                      <div class="postdec">
                        <el-input v-model="menuForm2.jobDuty" placeholder="请输入岗位职责" size="small" style="margin-right:363px;">    
                        </el-input> 
                      </div>
                      <div class="postdec">
                        <el-input v-model="menuForm2.welfare" placeholder="请输入福利待遇" size="small" style="margin-right:363px;">
                        </el-input> 
                      </div>                                            
                    </el-form-item>
                  </el-form>
                  <span slot="footer" class="dialog-footer">
                    <el-button v-if="isAdd==false&&isModify==false"  @click="closeDialog2" type="primary" size="small" class="el-form-item-t" style="background:#4787E3FF">返回</el-button>
                    <el-button v-if="isAdd==true || isModify==true" @click="dialogVisible2 = false" size="small" class="el-form-item-t">取 消</el-button>
                    <el-button v-if="isAdd==true || isModify==true" type="primary" @click="submitInfo()" size="small" class="el-form-item-t" style="background:#4787E3FF">确 定</el-button>
                  </span>
                </el-dialog>



                <el-dialog :visible.sync="userEditDialog.isShow" width="850px" style="padding: 15px;">
                  <span slot="title">
                    <div style="font-size:18px;">
                      {{'当前查看对象 - ' + userEditDialog.userName}}
                    </div>
                  </span>
                  <el-tabs class="system-contorl-tabs" v-model="userEditDialog.activeName" @tab-click="userEditDialogTabClick" style="border-top: 1px solid #ccc;">
                    <span style="padding: 15px;"></span>
                      <el-tab-pane label="基本信息" v-if="userControl.includes('userBaseTab')" name="userBaseTab">
                      <el-row :gutter="20">
                          <el-col :span="12">
                            <el-form :inline="false" :model="userDetilEditForm" class="demo-form-inline modi-icon" label-position="right" label-width='150px'>

                              <el-form-item label="姓名" class="init-label is-required" >
                            <el-input v-model="userDetilEditForm.userName" placeholder="" size="small" ></el-input>
                          </el-form-item>
                          <el-form-item label="性别" class="init-label is-required" >
                            <el-select v-model="userDetilEditForm.sexType" placeholder="请选择" size="small" clearable>
                              <el-option label="男" value="1"></el-option>
                              <el-option label="女" value="0"></el-option>
                            </el-select>     
                          </el-form-item>
                          <el-form-item label="手机号码" class="init-label is-required" >
                            <el-input v-model="userDetilEditForm.phone" placeholder="" size="small" ></el-input>
                          </el-form-item>
                          <el-form-item label="身份证号" class="init-label is-required" >
                            <el-input v-model="userDetilEditForm.certNo" placeholder="" size="small" ></el-input>
                          </el-form-item>
                          <el-form-item label="出生日期" class="init-label is-required" >
                            <el-input v-model="userDetilEditForm.birthday" placeholder="" size="small" ></el-input>
                          </el-form-item>
                          <el-form-item label="电子邮箱" class="init-label is-required" >
                            <el-input v-model="userDetilEditForm.mail" placeholder="" size="small" ></el-input>
                          </el-form-item>
                          <el-form-item label="听课时长" class="init-label is-required" >
                            <el-input v-model="userDetilEditForm.classTime" placeholder="" size="small" ></el-input>
                          </el-form-item>
                          <el-form-item label="上课时长" class="init-label is-required" >
                            <el-input v-model="userDetilEditForm.attendanceTime" placeholder="" size="small" ></el-input>
                          </el-form-item>
                          
                        </el-form>
                            </el-col>
                            <el-col :span="12" style="text-align: center;">
                              <img style="width:100px;height:100px;" src="@/assets/homePicture/men.jpg"/>
                              <!-- <el-avatar shape="square" :size="100" fit="fill" src="@/assets/homePicture/men.jpg"></el-avatar> -->
                            </el-col>
                          </el-row>
                        
                      
                      </el-tab-pane>

                      <el-tab-pane label="详细信息" v-if="userControl.includes('userDetailTab')" name="userDetailTab">
                        <el-row :gutter="20">
                          <el-col :span="12">
                            <el-form :inline="false" :model="userInfoEditForm" class="demo-form-inline modi-icon" label-position="right" label-width="150px">
                              <el-form-item label="岗位" :required="true" class="init-label is-required" >
                                <el-input v-model="userInfoEditForm.job" placeholder="请输入" size="small" >
                                </el-input>  
                              </el-form-item>
                              <el-form-item label="学历" :required="true" class="init-label is-required" >
                                <el-select v-model="userInfoEditForm.eduKind" placeholder="请输入" size="small" clearable>
                                  <el-option label="大专" :value="0" ></el-option>
                                  <el-option label="本科" :value="1" ></el-option>
                                  <el-option label="硕士" :value="2" ></el-option>
                                  <el-option label="博士" :value="3" ></el-option>
                                  <el-option label="其他" :value="4"></el-option>
                                </el-select>  
                              </el-form-item>
                              <el-form-item label="毕业院校" :required="true" class="init-label is-required" >
                                <el-input v-model="userInfoEditForm.school" placeholder="请输入" size="small">
                                </el-input>  
                              </el-form-item>
                              <el-form-item label="毕业时间" :required="true" class="init-label is-required" >
                                <el-date-picker
                                  v-model="userInfoEditForm.graTime"
                                  type="date"
                                  size="small"
                                  placeholder="选择日期">
                                </el-date-picker>
                              </el-form-item>
                              <el-form-item label="专业" :required="true" class="init-label is-required">
                                <el-input v-model="userInfoEditForm.major" placeholder="请输入" size="small" >
                                </el-input>  
                              </el-form-item>
                              <el-form-item label="职称" :required="true" class="init-label is-required">
                                <el-input v-model="userInfoEditForm.jobTitle" placeholder="" size="small" readonly>
                                </el-input>  
                              </el-form-item>
                              <el-form-item label="滞留年次" :required="true" class="init-label is-required">
                                <el-input v-model="userInfoEditForm.detentionTime" placeholder="" size="small" readonly>
                                </el-input>  
                              </el-form-item>
                              <el-form-item label="绩效" :required="true" class="init-label is-required">
                                <el-input v-model="userInfoEditForm.perForMance" placeholder="" size="small" readonly>
                                </el-input>  
                              </el-form-item>
                          
                        </el-form>
                            </el-col></el-row>
                        
                      
                      </el-tab-pane>

                      <el-tab-pane label="知识产权维护" v-if="userControl.includes('intellectualPropertyTab')" name="intellectualPropertyTab">
                        <el-form :inline="true" :model="userPanentExperienceEditForm" class="demo-form-inline modi-icon" label-position="right" label-width="150px">

                          <el-form-item label="专利名称" >
                            <el-input v-model="userPanentExperienceEditForm.name" placeholder="" size="small" ></el-input>
                          </el-form-item>
                          <el-form-item label="专利类别" >
                            <el-select v-model="userPanentExperienceEditForm.type" placeholder="请选择" size="small" clearable>
                              <el-option label="发明专利" value="1"></el-option>
                              <el-option label="外观设计专利" value="2"></el-option>
                              <el-option label="实用新型专利" value="3"></el-option>
                            </el-select>     
                          </el-form-item>
                          <el-form-item style="float:right">
                            <el-button type="primary" @click="getPanentToPage" style="background:#4787E3FF" size="small" class="el-form-item-t">查询</el-button>
                              <el-button type="primary" @click="userPatentEditDialogShow('', true, {})" style="background:#4787E3FF" size="small" class="el-form-item-t">新增</el-button>
                              <el-button type="primary" @click="deletePatent(userPanentExperienceEditForm.selectedIds)" style="background:#4787E3FF" size="small" class="el-form-item-t">删除</el-button>
                          </el-form-item>
                        
                        </el-form>
                        <el-table ref="multipleTable" :data="userPanentExperienceEditForm.tableDate" tooltip-effect="dark" :header-cell-style="{background:'#4787E3FF',color:'#fff'}" style="width: 100%"  row-class-name="greyRow" header-row-class-name="strong" @select="userPatentTableSelect" @select-all="userPatentTableSelectAll" >
                          <el-table-column type="selection" width="55" align="center"></el-table-column>
                          <el-table-column prop="name" label="专利名称" align="center"></el-table-column>
                          <el-table-column prop="patentType" label="专利类别" align="center">
                            <template slot-scope="scope">
  <span v-if="scope.row.patentType == 1">发明专利</span>
  <span v-if="scope.row.patentType == 2">外观设计专利</span>
  <span v-if="scope.row.patentType == 3">实用新型专利</span>
</template>
                          </el-table-column>
                          <el-table-column prop="licenseTime" label="授权日期" width="200" align="center"></el-table-column>
                          <el-table-column label="操作" align="center">
                              <template slot-scope="scope">
  <el-button
    @click="userPatentEditDialogShow(scope.row.id, false, scope.row)"
    type="text"
    size="medium"
    class="underline"
  >修改</el-button>
  <!-- <el-button @click="open2(scope.row)" type="text" size="small">删除</el-button> -->
</template>
                          </el-table-column>
                        </el-table>
                        <el-pagination
                          @current-change="userPanentExperienceEditFormHandleCurrentChange"
                          :current-page.sync="userPanentExperienceEditForm.pageIndex"
                          :page-size="userPanentExperienceEditForm.pageSize"
                          layout="total, prev, pager, next"
                          background
                          :total="userPanentExperienceEditForm.totalCount"
                          style="float: right;">
                        </el-pagination>
                      </el-tab-pane>
                      <el-tab-pane label="项目经验维护" v-if="userControl.includes('projectExperienceTab')" name="projectExperienceTab">
                        <el-form :inline="true" :model="userProjectExperienceEditForm" class="demo-form-inline modi-icon" label-position="right" label-width="150px">

                          <el-form-item label="项目名称" >
                            <el-input v-model="userProjectExperienceEditForm.name" placeholder="" size="small" ></el-input>
                          </el-form-item>
                          <el-form-item label="项目类别" >
                            <el-select v-model="userProjectExperienceEditForm.type" placeholder="请选择" size="small" clearable>
                              <el-option label="公司级" value="1"></el-option>
                              <el-option label="集团级" value="2"></el-option>
                              <el-option label="省部级" value="3"></el-option>
                              <el-option label="国家级" value="4"></el-option>
                            </el-select>     
                          </el-form-item>
                          <el-form-item style="float:right">
                            <el-button type="primary" @click="getProjectToPage" style="background:#4787E3FF" size="small" class="el-form-item-t">查询</el-button>
                              <el-button type="primary" @click="userProjectEditDialogShow('', true, {})" style="background:#4787E3FF" size="small" class="el-form-item-t">新增</el-button>
                              <el-button type="primary" @click="deleteProject(userProjectExperienceEditForm.selectedIds)" style="background:#4787E3FF" size="small" class="el-form-item-t">删除</el-button>
                          </el-form-item>
                        </el-form>
                        <el-table ref="multipleTable" :data="userProjectExperienceEditForm.tableDate" tooltip-effect="dark" :header-cell-style="{background:'#4787E3FF',color:'#fff'}" style="width: 100%" row-class-name="greyRow" header-row-class-name="strong" @select="userProjectTableSelect" @select-all="userProjectTableSelectAll" >
                          <el-table-column type="selection" width="55" align="center"></el-table-column>
                          <el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
                          <el-table-column prop="projectLevel" label="项目类别" align="center">
                            <template slot-scope="scope">
  <span v-if="scope.row.projectLevel == 1">公司级</span>
  <span v-if="scope.row.projectLevel == 2">集团级</span>
  <span v-if="scope.row.projectLevel == 3">省部级</span>
  <span v-if="scope.row.projectLevel == 4">国家级</span>
</template>
                          </el-table-column>
                          <el-table-column prop="projectAchievement" label="项目成果" width="200" align="center">
                            <template slot-scope="scope">
  <span>{{scope.row.projectAchievement.substr(0,20)+ (scope.row.projectAchievement.length > 20 ? "..." : "")}}</span>
</template>
                          </el-table-column>
                          <el-table-column label="操作" align="center">
                              <template slot-scope="scope">
  <el-button
    @click="userProjectEditDialogShow(scope.row.id, false, scope.row)"
    type="text"
    size="medium"
    class="underline"
  >修改</el-button>
  <!-- <el-button @click="open2(scope.row)" type="text" size="small">删除</el-button> -->
</template>
                          </el-table-column>
                        </el-table>
                        <el-pagination
                          @current-change="userProjectExperienceEditFormHandleCurrentChange"
                          :current-page.sync="userProjectExperienceEditForm.pageIndex"
                          :page-size="userProjectExperienceEditForm.pageSize"
                          layout="total, prev, pager, next"
                          background
                          :total="userProjectExperienceEditForm.totalCount"
                          style="float: right;">
                        </el-pagination>
                      </el-tab-pane>
                      <el-tab-pane v-if="userControl.includes('userRoleTab')" label="角色维护" name="userRoleTab">
                        <el-form :inline="true" :model="userRoleEditForm" class="demo-form-inline modi-icon" label-position="right" label-width="150px">
                          <el-row :gutter="20">
                            <el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
                            <el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
                            <el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
                            <el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
                          </el-row>
                          <el-form-item label="角色名称" >
                            <el-input v-model="userRoleEditForm.name" placeholder="" size="small" ></el-input>
                          </el-form-item>
                          <el-form-item label="角色描述" >
                            <el-input v-model="userRoleEditForm.description" placeholder="" size="small">
                            </el-input>     
                          </el-form-item>
                          <br>
                        <el-form-item style="float: right">
                          <el-button type="primary" @click="assignRoleToUser(true)" style="background:#4787E3FF" size="small" class="el-form-item-t">新增</el-button>
                          <el-button type="primary" @click="userEditDialogtogger('userRoleTab', {id: userEditDialog.userId});" style="background:#4787E3FF" size="small" class="el-form-item-t">查询</el-button>
                        </el-form-item>
                        </el-form>
                        <el-table ref="multipleTable" :data="userRoleEditForm.tableData" tooltip-effect="dark" :header-cell-style="{background:'#4787E3FF',color:'#fff'}" style="width: 100%" height="400px" row-class-name="greyRow" header-row-class-name="strong" @select="select" @select-all="selectAll" >
                          <el-table-column type="selection" width="55" align="center"></el-table-column>
                          <el-table-column prop="roleName" label="角色名称" width="150" align="center"></el-table-column>
                          <el-table-column prop="createTime" label="创建时间" width="150" align="center">
                            <template slot-scope="scope">
  <span>{{dateFtt(new Date(scope.row.createTime))}}</span>
</template>
                          </el-table-column>
                          <el-table-column prop="description" label="描述" width="200" align="center"></el-table-column>
                          <el-table-column label="操作" align="center">
                              <template slot-scope="scope">
  <el-button
    type="text"
    size="medium"
    class="underline"
    @click="assignRoleToUser(false,scope.row)"
  >查看</el-button>
  <el-button
    type="text"
    size="medium"
    class="underline"
    @click="userRoleAddDetilDelete(scope.row.id)"
  >删除</el-button>
</template>
                          </el-table-column>
                        </el-table>
                      </el-tab-pane>
                      <el-tab-pane v-if="userControl.includes('userTeaTab')" label="导师身份维护" name="userTeaTab">
                        <!-- <el-form :inline="true" :model="userTutorEditForm" class="demo-form-inline modi-icon" label-position="right" label-width="100px">

                          <el-form-item label="部门" :required="true" >
                            <el-input v-model="userTutorEditForm.userName" placeholder="" ></el-input>
                          </el-form-item>
                          <el-form-item label="身份类别" :required="true" >
                            <el-select v-model="userTutorEditForm.gender" placeholder="请选择">
                            </el-select>     
                          </el-form-item>
                        
                        </el-form>
                        <el-table ref="multipleTable" :data="userTutorEditForm.tableDate" tooltip-effect="dark" :header-cell-style="{background:'#4787E3FF',color:'#fff'}" style="width: 100%" @select="select" @select-all="selectAll" >
                          <el-table-column type="selection" width="55"></el-table-column>
                          <el-table-column prop="name" label="部门" width="150"></el-table-column>
                          <el-table-column prop="kindType" label="身份类型" width="150"></el-table-column>
                          <el-table-column prop="deptName" label="操作权限" width="200"></el-table-column>
                          <el-table-column label="操作">
                              <template slot-scope="scope">
  <el-button @click="modify(scope.row)" type="text" size="small">查看</el-button>
  <el-button @click="open2(scope.row)" type="text" size="small">删除</el-button>
</template>
                          </el-table-column>
                        </el-table> -->
                        <el-row :gutter="20">
                          <el-col :span="6"><div class="grid-content bg-purple">&nbsp;</div></el-col>
                          <el-col :span="12"><div class="grid-content bg-purple">
                            <el-row>
                              <el-col :span="8" style="text-align: right;">导师资格</el-col>  
                              <el-col :span="2" style="text-align: right;">&nbsp;</el-col>  
                              <el-col :span="14">
                                <el-switch
                                  v-model="userTutorEditForm.flag"
                                  active-color="#13ce66"
                                  inactive-color="#ff4949">
                                </el-switch>  
                              </el-col> 
                            </el-row>  
                            <el-row style="margin-top: 15px;">
                              <el-col :span="8" style="text-align: right;">描述</el-col>  
                              <el-col :span="2" style="text-align: right;">&nbsp;</el-col>  
                              <el-col :span="14">
                                <el-input
                                  type="textarea"
                                  :rows="2"
                                  :maxLength="50"
                                  placeholder="请输入内容"
                                  v-model="userTutorEditForm.introduce" size="small">
                                </el-input>  
                              </el-col> 
                            </el-row>  
                          </div></el-col>
                          <el-col :span="6"><div class="grid-content bg-purple">&nbsp;</div></el-col>
                        </el-row>
                      </el-tab-pane>
                      <el-tab-pane v-if="userControl.includes('userSigmaTab')" label="六西格玛维护" name="userSigmaTab">
                        <span>
                          <el-form :inline="false" :model="userSixAddForm" class="demo-form-inline modi-icon" label-position="right" label-width="150px">
                              <el-form-item label="取得时间" :required="true" class="init-label is-required" > 
                                <el-date-picker
                            v-model="userSixAddForm.acquisitionTime"
                            type="date"
                            size="small"
                            placeholder="请选择"
                            style="width: 185px;">
                          </el-date-picker>
                              </el-form-item>
                              <el-form-item label="证书编号" :required="true" class="init-label is-required" >
                                <el-input v-model="userSixAddForm.certificateNumber" placeholder="请输入" size="small" >
                                </el-input>  
                              </el-form-item>
                              <el-form-item label="等级" :required="true" class="init-label is-required" >
                                <el-select v-model="userSixAddForm.sixSigmaGrade" placeholder="请输入" size="small">
                                  <el-option label="黄带" :value="'黄带'" ></el-option>
                                  <el-option label="绿带" :value="'绿带'" ></el-option>
                                  <el-option label="黑带" :value="'黑带'" ></el-option>
                                </el-select>  
                              </el-form-item>                          
                        </el-form>
                          
                        </span>
                      </el-tab-pane>
                  </el-tabs>
                  <span slot="footer" class="dialog-footer">
                      <el-button @click="userEditDialog.isShow = false" size="small">取 消</el-button>
                      <!-- <el-button v-if="userEditDialog.activeName === 'userDetailTab'" type="primary" @click="updateUserDetail" size="small" style="background:#4787E3FF">提交</el-button> -->
                      <el-button v-if="userEditDialog.activeName === 'userSigmaTab'" type="primary" @click="addUserSixData" size="small" style="background:#4787E3FF">提交</el-button>
                      <el-button v-if="userEditDialog.activeName === 'userTeaTab'" type="primary" @click="updateUserTutor" size="small" style="background:#4787E3FF">提交</el-button>
                    </span>
                </el-dialog>
                <el-dialog :visible.sync="userRoleAddDetilShow" width="800px" style="padding: 15px;">
                  <span slot="title">
                    <div style="margin-top: -5px; margin-bottom: 15px;font-size:18px">
                      {{'当前查看对象 - ' + userEditDialog.userName}}
                    </div>
                  </span>
                  <div class="detailsTip" style="padding: 15px;">
                    <el-breadcrumb separator-class="el-icon-arrow-right">
                      <el-breadcrumb-item>用户角色维护</el-breadcrumb-item>
                      <el-breadcrumb-item>角色{{dialogName}}</el-breadcrumb-item>
                    </el-breadcrumb>
                  </div>
                  <el-row :gutter="20">
                    <el-col :span="4">
                    </el-col>
                    <el-col :span="20">
                      <el-form :inline="true" :model="userRoleAddForm" class="demo-form-inline modi-icon" label-position="right" label-width="150px">
                        <el-form-item label="角色名称"  >
                          <el-select  placeholder="请选择" v-model="userRoleAddForm.roleSelectedData" @change="userRoleAddFormRoleSelectChange" clearable :disabled="!userRoleAddForm.isCreate" size="small">
                            <el-option v-for="role in userRoleAddForm.roleSelectData" :label="role.roleName" :value="role.id" :key="role.id" >{{role.roleName}}</el-option>
                          </el-select>   
                        </el-form-item>
                        <el-form-item label="角色ID"  >
                          <el-input v-model="userRoleAddForm.roleId" placeholder="" :readonly="true" size="small"></el-input>
                        </el-form-item>
                        
                        <el-form-item label="角色权限"  >
                          <el-input type="textarea" :rows="3" v-model="userRoleAddForm.defaultRoleStr" placeholder=""  readonly size="small" style="width: 400px;" width="400px"></el-input>
                        </el-form-item>
                        <el-form-item label="操作权限"  >
                          <el-input type="textarea" :rows="3" v-model="userRoleAddForm.activeRoleStr" placeholder="" readonly size="small" style="width: 400px;" width="400px"></el-input>
                        </el-form-item>
                      </el-form>
                    </el-col>
                  </el-row>
                  <span slot="footer" class="dialog-footer">
                      <el-button @click="userRoleAddDetilShow = false" size="small">取 消</el-button>
                      <el-button type="primary" v-if="userRoleAddForm.isCreate" @click="userRoleAddDetilSubmit" size="small" style="background:#4787E3FF">提交</el-button>
                    </span>
                </el-dialog>

                <el-dialog :visible.sync="roleEditDialog.isShow" width="800px" style="padding: 15px;">
                  <span slot="title">
                    <div style="margin-top: -5px; margin-bottom: 15px;">
                      {{roleEditDialog.title}}
                    </div>
                  </span>
                  <div class="detailsTip" style="padding: 15px;">
                    <el-breadcrumb separator-class="el-icon-arrow-right">
                      <el-breadcrumb-item>{{roleEditDialog.secondTitle}}</el-breadcrumb-item>
                    </el-breadcrumb>
                  </div>
                  <el-form :inline="true" :model="roleEditDialogForm" class="demo-form-inline modi-icon" label-position="right" label-width="150px">
                    <el-row :gutter="20">
                    <el-col :span="12">
                        <el-form-item label="角色名称" :required="true" >
                          <el-input v-model="roleEditDialogForm.roleName" placeholder="" size="small" style="width: 150px;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                      <el-form-item label="创建时间" :required="true" >
                          <el-date-picker
                            v-model="roleEditDialogForm.createTime"
                            type="datetime"
                            size="small"
                            placeholder="请选择"
                            style="width: 185px;">
                          </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <!-- <el-col :span="24">
                      <el-form-item label="基本权限" :required="true" >
                          <el-checkbox-group v-model="roleEditDialogForm.defaultPermissionCheckedList" @change="checkedDefaultPermissionChange">
                            <el-checkbox v-for="permission in roleEditDialog.defaultPermissionList" :label="permission.id" :key="permission.id" :disabled="permission.id == 1">{{permission.permissionsName}}</el-checkbox>
                          </el-checkbox-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="操作权限" :required="true" >
                          <el-checkbox-group v-model="roleEditDialogForm.activePermissionCheckedList" @change="checkedActivePermissionChange">
                            <el-checkbox v-for="permission in roleEditDialog.activePermissionList" :label="permission.id" :key="permission.id">{{permission.permissionsName}}</el-checkbox>
                          </el-checkbox-group>
                        </el-form-item>
                    </el-col> -->
                    <el-col :span="24">
                      <el-form-item label="权限" :required="true" >
                        <el-tree
                          :props="roleEditDialogForm.permissionProps"
                          show-checkbox
                          :default-checked-keys="roleEditDialogForm.permissionDefaultCheckedList"
                          node-key="id"
                          :data="roleEditDialogForm.permissionData"
                          :check-strictly="roleEditDialogForm.permissionTreeCheckStrictly"
                          ref="roleEditDialogFormPermissionTree"
                          @check-change="permissionCheckChange">
                        </el-tree>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="角色描述" style="width: 100%">
                          <el-input
                            type="textarea"
                            :rows="2"
                            placeholder="请输入内容"
                            v-model="roleEditDialogForm.description"
                            style="width: 100%" size="small"
                            >
                          </el-input>
                        </el-form-item>
                    </el-col>
                    
                  </el-row>
                  </el-form>
                  <span slot="footer" class="dialog-footer">
                      <el-button @click="roleEditDialog.isShow = false" size="small">取 消</el-button>
                      <el-button type="primary" @click="submitRoleEditDialogForm" size="small" style="background:#4787E3FF">提交</el-button>
                    </span>
                </el-dialog>


                <el-dialog :visible.sync="userProjectEditDialog.isShow" width="800px" style="padding: 15px;">
                  <span slot="title">
                    <div style="margin-top: -5px; margin-bottom: 15px;font-size:18px">
                      {{'当前查看对象 - '  + userEditDialog.userName}}
                    </div>
                  </span>
                  <div class="detailsTip" style="padding: 15px;">
                    <el-breadcrumb separator-class="el-icon-arrow-right">
                      <el-breadcrumb-item>用户项目经验维护</el-breadcrumb-item>
                      <el-breadcrumb-item>项目经验{{dialogName}}</el-breadcrumb-item>
                    </el-breadcrumb>
                  </div>
                  <el-row :gutter="20">
                    <el-col :span="4">
                    </el-col>
                    <el-col :span="20">
                      <el-form :inline="false" :model="userProjectEditDialog" class="demo-form-inline modi-icon" label-position="right" label-width="150px">
                        <el-form-item label="项目名称"  >
                          <el-input v-model="userProjectEditDialog.projectName" placeholder="" size="small"></el-input>
                        </el-form-item>
                        <el-form-item label="项目类别"  >
                          <el-select v-model="userProjectEditDialog.projectLevel" placeholder="" size="small" clearable>
                            <el-option label="公司级" :value="1"></el-option>
                            <el-option label="集团级" :value="2"></el-option>
                            <el-option label="省部级" :value="3"></el-option>
                            <el-option label="国家级" :value="4"></el-option>
                          </el-select>
                        </el-form-item>
                        
                        <el-form-item label="开始时间"  >
                          <el-date-picker
                            v-model="userProjectEditDialog.projectStarttime"
                            type="datetime"
                            size="small"
                            :max="new Date()"
                            placeholder="请选择">
                          </el-date-picker>
                        </el-form-item>
                        <el-form-item label="结束时间"  >
                          <el-date-picker
                            v-model="userProjectEditDialog.projectEndtime"
                            type="datetime"
                            size="small"
                            :min="userProjectEditDialog.projectStarttime"
                            placeholder="请选择">
                          </el-date-picker>
                        </el-form-item>
                        <el-form-item label="项目职务"  >
                          <el-select v-model="userProjectEditDialog.projectPost" placeholder="" size="small" clearable>
                            <el-option label="主持人" value="主持人"></el-option>
                            <el-option label="参与人" value="参与人"></el-option>
                          </el-select>
                        </el-form-item>
                        <el-form-item label="项目简介"  >
                          <el-input type="textarea" :rows="3" style="width: 400px" v-model="userProjectEditDialog.projectIntroduce" placeholder="" size="small"></el-input>
                        </el-form-item>
                        <el-form-item label="项目成果"  >
                          <el-input type="textarea" :rows="3" style="width: 400px" v-model="userProjectEditDialog.projectAchievement" placeholder="" size="small"></el-input>
                        </el-form-item>
                      </el-form>
                    </el-col>
                  </el-row>
                  <span slot="footer" class="dialog-footer">
                      <el-button @click="userProjectEditDialog.isShow = false" size="small">取 消</el-button>
                      <el-button type="primary" @click="userProjectEditDialogSubmit" size="small" style="background:#4787E3FF">提交</el-button>
                    </span>
                </el-dialog>


                <el-dialog :visible.sync="userPatentEditDialog.isShow" width="800px" style="padding: 15px;">
                  <span slot="title">
                    <div style="margin-top: -5px; margin-bottom: 15px;font-size:18px">
                      {{'当前查看对象 - ' + userEditDialog.userName}}
                    </div>
                  </span>
                  <div class="detailsTip" style="padding: 15px;">
                    <el-breadcrumb separator-class="el-icon-arrow-right">
                      <el-breadcrumb-item>用户知识产权维护</el-breadcrumb-item>
                      <el-breadcrumb-item>知识产权{{dialogName}}</el-breadcrumb-item>
                    </el-breadcrumb>
                  </div>
                  <el-row :gutter="20">
                    <el-col :span="4">
                    </el-col>
                    <el-col :span="20">
                      <el-form :inline="false" :model="userPatentEditDialog" class="demo-form-inline modi-icon" label-position="right" label-width="150px">
                        <el-form-item label="专利名称"  >
                          <el-input v-model="userPatentEditDialog.name" placeholder="" size="small"></el-input>
                        </el-form-item>
                        <el-form-item label="专利类型"  >
                          <el-select v-model="userPatentEditDialog.patentType" placeholder="" size="small" clearable>
                            <el-option label="发明专利" :value="1"></el-option>
                            <el-option label="外观设计专利" :value="2"></el-option>
                            <el-option label="实用新型专利" :value="3"></el-option>
                          </el-select>
                        </el-form-item>
                        
                        <el-form-item label="授权日期"  >
                          <el-date-picker
                            v-model="userPatentEditDialog.licenseTime"
                            type="datetime"
                            size="small"
                            placeholder="请选择">
                          </el-date-picker>
                        </el-form-item>
                        <el-form-item label="提案号"  >
                          <el-input v-model="userPatentEditDialog.patentNumber" placeholder="" size="small"></el-input>
                        </el-form-item>
                        <el-form-item label="参与角色"  >
                          <el-input v-model="userPatentEditDialog.patentPost" placeholder="" size="small"></el-input>
                        </el-form-item>
                        <el-form-item label="专利权人"  >
                          <el-input v-model="userPatentEditDialog.patentPerson" placeholder="" size="small"></el-input>
                        </el-form-item>
                        <!-- <el-form-item label="专利内部编号" style="display:none;" >
                          <el-input v-model="userPatentEditDialog.patentInternalNumber" placeholder="" size="small"></el-input>
                        </el-form-item> -->
                      </el-form>
                      </el-col>
                  </el-row>
                  <span slot="footer" class="dialog-footer">
                      <el-button @click="userPatentEditDialog.isShow = false" size="small">取 消</el-button>
                      <el-button type="primary" @click="userPatentEditDialogSubmit" size="small" style="background:#4787E3FF">提交</el-button>
                    </span>
                </el-dialog>


                <el-dialog :visible.sync="userTutorEditDialog.isShow" width="800px" style="padding: 15px;">
                  <span slot="title">
                    <div style="margin-top: -5px; margin-bottom: 15px;font-size:18px">
                      {{'当前查看对象 - ' + userEditDialog.userName}}
                    </div>
                  </span>
                  <div class="detailsTip" style="padding: 15px;">
                    <el-breadcrumb separator-class="el-icon-arrow-right">
                      <el-breadcrumb-item>用户导师身份维护</el-breadcrumb-item>
                      <el-breadcrumb-item>导师身份{{dialogName}}</el-breadcrumb-item>
                    </el-breadcrumb>
                  </div>
                  <el-row :gutter="20">
                    <el-col :span="4">
                    </el-col>
                    <el-col :span="20">
                      <el-form :inline="true" :model="userPatentEditDialog" class="demo-form-inline modi-icon" label-position="right" label-width="150px">
                        <el-form-item label="专利名称"  >
                          <el-input v-model="userPatentEditDialog.name" placeholder="" size="small"></el-input>
                        </el-form-item>
                        <el-form-item label="专利类型"  >
                          <el-input v-model="userPatentEditDialog.patentType" placeholder="" size="small"></el-input>
                        </el-form-item>
                        
                        <el-form-item label="授权日期"  >
                          <el-date-picker
                            v-model="userPatentEditDialog.licenseTime"
                            type="datetime"
                            size="small"
                            placeholder="请选择">
                          </el-date-picker>
                        </el-form-item>
                         <el-form-item label="提案号"  >
                          <el-input v-model="userPatentEditDialog.patentNumber" placeholder="" size="small"></el-input>
                        </el-form-item>
                         <el-form-item label="参与角色"  >
                          <el-input v-model="userPatentEditDialog.patentPost" placeholder="" size="small"></el-input>
                        </el-form-item>
                         <el-form-item label="专利权人"  >
                          <el-input v-model="userPatentEditDialog.patentPerson" placeholder="" size="small"></el-input>
                        </el-form-item>
                         <!-- <el-form-item label="专利内部编号" style="display:none;" >
                          <el-input v-model="userPatentEditDialog.patentInternalNumber" placeholder="" size="small"></el-input>
                        </el-form-item> -->
                      </el-form>
                    </el-col>
                    <el-col :span="4">
                    </el-col>
                  </el-row>
                  <span slot="footer" class="dialog-footer">
                      <el-button @click="userPatentEditDialog.isShow = false" size="small">取 消</el-button>
                      <el-button type="primary" @click="userPatentEditDialogSubmit" size="small" style="background:#4787E3FF">提交</el-button>
                    </span>
                </el-dialog>
    </div>
</template>

<script>
// import Look from "./actions/look";
import { Message } from "element-ui";
import { async } from "q";
import axios from "axios";
export default {
  data() {
    return {
      caonimalixin: [],
      disAgree: false,
      agree: false,
      smallLoading: false, // 默认文件上传过度
      fileListMenus: [], // 默认文件
      classRadio: "",
      fullscreenLoading: false,
      topClear: "padding-top:0;",
      componentName: "home",
      checkApply: false,
      menuRout: [
        "home",
        "systemControl",
        "recommendation",
        "growthArchives",
        "studyCenter",
        "thingsTip",
        "personnelSystem",
        "outpack"
      ],
      dialogImageUrl: "",
      dialogVisible: false,
      fileList: [],
      editControl: true,
      userControl: "", // 系统管理，用户管理权限控制
      userInfoName: "",
      menuList: [],
      studyList: ["userManage", "roleManage", "bannerManage"],
      userControlActive: [
        "userBaseTab",
        "userDetailTab",
        "intellectualPropertyTab",
        "projectExperienceTab",
        "userRoleTab",
        "userTeaTab",
        "userSigmaTab"
      ],
      activeName: "",
      isAdd: false, //区别是新增还是修改
      isModify: false, //
      dialogVisible: false, //人才引荐
      dialogVisible2: false, //岗位
      menuForm: {}, //人才引荐对话框
      menuForm2: {}, //岗位对话框
      tableData: [], //人才引荐管理表格数据
      tableData2: [], //岗位管理表格数据
      multipleSelection: [], //多选数组
      id: 0,
      ids: [], //删除选择的数组
      basePath: axios.defaults.baseURL,
      params: {
        //人才引荐参数
        name: "",
        deparment: "",
        education: "",
        jobDuty: "",
        page: 1,
        pageSize: 4
      },
      params2: {
        //岗位管理参数
        name: "",
        kind: "",
        deptName: "",
        page: 1,
        pageSize: 4,
        id: "",
        creatTime: ""
      },
      currentPage: 1,
      currentPage2: 1,
      totalCount: 0, // 总条数
      totalCount2: 0, // 总条数
      activeIndex: "1",
      value3: false, //switch开关
      deptTypes: [], //部门信息
      postm_id: 0, //修改数据的id值
      dialogName: "修改",
      userEditDialog: {
        userId: "",
        userName: "",
        searchTutor: "",
        activeName: "",
        isShow: false
      },
      userDetilEditForm: {
        userName: "",
        gender: "",
        phone: "",
        IDCard: "",
        birthday: "",
        sexType: "",
        certNo: "",
        mail: "",
        classTime: "",
        attendanceTime: "",
        photo: ""
      },
      userRoleEditForm: {
        tableData: [],
        name: "",
        description: "",
        pageIndex: 1,
        pageSize: 10,
        totalCount: 0
      },
      userTutorEditForm: {
        tableData: [],
        flag: false,
        introduce: ""
      },
      userProjectExperienceEditForm: {
        tableData: [],
        name: "",
        type: "",
        pageIndex: 1,
        pageSize: 3,
        totalCount: 0,
        selectedIds: []
      },
      userPanentExperienceEditForm: {
        tableData: [],
        name: "",
        type: "",
        pageIndex: 1,
        pageSize: 3,
        totalCount: 0,
        selectedIds: []
      },
      userIntellectualPropertyEditForm: {
        tableData: []
      },
      userRoleAddDetilShow: false,
      userRoleAddForm: {
        isCreate: true,
        userId: "",
        roleId: "",
        roleIds: [],
        roleSelectData: [],
        roleSelectedData: [],
        permissionsDsc: []
      },
      RoleTableForm: {
        id: "",
        name: "",
        createTime: "",
        page: 1,
        size: 10,
        tableData: [],
        totalCount: 0,
        selectedIds: [],
        description: ""
      },
      roleEditDialog: {
        title: "角色新增",
        isShow: false,
        secondTitle: "录入角色信息",
        isCreate: true,
        defaultPermissionList: [],
        activePermissionList: [],
        defaultPermissionCheckedList: [],
        activePermissionCheckedList: []
      },
      roleEditDialogForm: {
        id: "",
        roleName: "",
        createTime: "",
        permissions: [],
        permissionCheckedList: [],
        permissionDefaultCheckedList: [],
        permissionData: [],
        permissionTreeCheckStrictly: true,
        permissionProps: {
          label: "permissionsName",
          children: "childrens"
        },
        description: "",
        defaultPermissionCheckedList: [],
        activePermissionCheckedList: []
      },
      userInfoEditForm: {
        jobTitle: "",
        eduKind: "",
        school: "",
        graTime: "",
        major: "",
        job: "",
        detentionTime: "",
        perForMance: "",
        eduId: ""
      },
      userProjectEditDialog: {
        id: "",
        userId: "",
        isCreate: true,
        isShow: false,
        projectName: "",
        projectLevel: "",
        projectStarttime: "",
        projectEndtime: "",
        projectPost: "",
        projectIntroduce: "",
        projectAchievement: ""
      },
      userPatentEditDialog: {
        id: "",
        isCreate: false,
        userId: "",
        isShow: false,
        name: "",
        patentType: "",
        licenseTime: "",
        patentNumber: "",
        patentPost: "",
        patentPerson: "",
        patentInternalNumber: ""
      },
      userTutorEditDialog: {
        isShow: false
      },
      userTableRoleOptions: [],
      userTable: {
        dept: "",
        education: "",
        role: "",
        name: "",
        pageSize: 10,
        page: 1,
        tableData: [],
        total: 0
      },
      bannerList: new Array(4),
      imgDialogVisible: false,
      UserSixData: {},
      userSixAddForm: {
        userId: "",
        id: "",
        acquisitionTime: "",
        certificateNumber: "",
        sixSigmaGrade: ""
      }
    };
  },
  mounted() {
    let menuList = localStorage.getItem("menuList");
    let initMenuList = JSON.parse(menuList);
    let studyList = this.studyList;
    let userControlActive = this.userControlActive;
    this.menuList = initMenuList.permissions.tabPages;
    this.caonimalixin = initMenuList.permissions.points;
    let studyListObj = initMenuList.permissions.tabPages;
    let realStudyList = studyList.filter(
      item => studyListObj.indexOf(item) > -1
    );
    let reluserControlActive = userControlActive.filter(
      item => initMenuList.permissions.points.indexOf(item) > -1
    );
    if (reluserControlActive.length == 0) {
      this.editControl = false;
    }
    this.userControl = initMenuList.permissions.points;
    this.userInfoName = initMenuList.username;
    this.activeName = realStudyList[0];
    this.userEditDialog.activeName = reluserControlActive[0];

    this.$http
      .get("/role/getRole?page=1&size=1000&name=&description=&createTime")
      .then(res => {
        this.userTableRoleOptions = res.data.data.rows;
      });
  },
  methods: {
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.imgDialogVisible = true;
    },
    tabClick(tab, event) {
      console.log(tab, event);
    },
    //下载
    upload(params) {
      console.log(params);
      window.open(params.attachmentAddress);
    },
    //得到人才引荐管理表格数据
    async getRecommendList() {
      const { data: res } = await this.$http.get(
        "/user?page=" +
          this.userTable.page +
          "&size=" +
          this.userTable.pageSize +
          "&name=" +
          this.userTable.name +
          "&education=" +
          this.userTable.education +
          "&deptId=" +
          this.userTable.dept +
          "&role=" +
          this.userTable.role
      );
      for (let i = 0; i < res.data.rows.length; i++) {
        //处理时间戳
        let timer = res.data.rows[i].time;
        var date = new Date(parseInt(timer));
        var Y = date.getFullYear() + "/";
        var M =
          (date.getMonth() + 1 < 10
            ? "0" + (date.getMonth() + 1)
            : date.getMonth() + 1) + "/";
        var D =
          date.getDate() + 1 < 10
            ? "0" + (date.getDate() + 1)
            : date.getDate() + 1;
        res.data.rows[i].time = Y + M + D;
        //判断类别
        if (res.data.rows[i].kind == 0) {
          res.data.rows[i].kindType = "内部";
        } else {
          res.data.rows[i].kindType = "外部";
        }
      }
      this.userTable.tableData = res.data.rows;
      this.userTable.total = res.data.total;
    },
    //得到岗位管理表格数据
    async getPositionList() {
      const { data: res } = await this.$http.post(
        "/recruitment_pc/qryRecruitmentListPC",
        this.params2
      );
      // console.log('岗位管理',res)
      for (let i = 0; i < res.data.recBacks.length; i++) {
        //判断类别
        if (res.data.recBacks[i].kind == 0) {
          res.data.recBacks[i].kindType = "内部";
        } else {
          res.data.recBacks[i].kindType = "外部";
        }
        //薪资
        res.data.recBacks[i].salary =
          res.data.recBacks[i].fSalary +
          "-" +
          res.data.recBacks[i].eSalary +
          "k";
        // 是否推荐
        if (res.data.recBacks[i].recommended == 0) {
          res.data.recBacks[i].switchValue = false;
        } else {
          res.data.recBacks[i].switchValue = true;
        }
      }
      console.log("000", res.data.recBacks);
      this.tableData2 = res.data.recBacks;
      this.totalCount2 = res.data.totals;
    },
    //分页-人才引荐
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      this.userTable.page = val;
      this.getRecommendList();
    },
    //分页-岗位管理
    handleSizeChange2(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange2(val) {
      this.params2.page = val;
      this.getPositionList();
    },
    handleCurrentChange(val) {
      this.params.page = val;
      this.getRecommendList();
    },
    roleTablePageChange(val) {
      this.RoleTableForm.page = val;
      this.getRolePage();
    },
    userPanentExperienceEditFormHandleCurrentChange(val) {
      this.userPanentExperienceEditForm.pageIndex = val;
      this.getPanentToPage();
    },
    userProjectExperienceEditFormHandleCurrentChange(val) {
      this.userPanentExperienceEditForm.pageIndex = val;
      this.getProjectToPage();
    },
    importFile() {
      this.checkApply = true;
    },
    diloagClose() {
      this.fileListMenus = [];
    },
    limitNums() {
      Message({
        message: "只能上传一个文件",
        type: "warning",
        duration: 2000
      });
    },
    // 视频文件删除
    limitRemoves(flie) {
      this.fileListMenus = [];
    },
    // 微课程文件
    addAttachments(file, fileList) {
      let { classRadio } = this;
      this.fileListMenus = fileList;
      let formdata = new FormData();
      if (classRadio == 7 || classRadio == 8) {
        formdata.append("multipartFile", file.raw);
      } else {
        formdata.append("file", file.raw);
      }
      let config = {
        header: {
          "Content-Type": "mutipart/form-data"
        }
      };
      if (classRadio == 1) {
        this.flieUpload("/excel/rank/import", formdata, config);
      } else if (classRadio == 2) {
        this.flieUpload("/excel/per/import", formdata, config);
      } else if (classRadio == 3) {
        this.flieUpload("/excel/title/import", formdata, config);
      } else if (classRadio == 4) {
        this.flieUpload("/excel/project/import", formdata, config);
      } else if (classRadio == 5) {
        this.flieUpload("/excel/patent/import", formdata, config);
      } else if (classRadio == 6) {
        this.flieUpload("/excel/six/import", formdata, config);
      } else if (classRadio == 7) {
        this.flieUpload("/coursePC/importCourse", formdata, config);
      } else if (classRadio == 8) {
        this.flieUpload("/teaPC/importTea", formdata, config);
      }
      console.log(classRadio);
    },
    flieUpload(url, formdata, config) {
      this.smallLoading = true;
      this.disAgree = true;
      this.agree = true;
      this.$http.post(url, formdata, config).then(res => {
        if (res.data.success) {
          Message({
            message: res.data.data,
            type: "success",
            duration: 5000
          });
          this.checkApply = false;
          this.smallLoading = false;
          this.disAgree = false;
          this.agree = false;
        } else {
          this.smallLoading = false;
          this.disAgree = false;
          this.agree = false;
        }
      });
    },
    //查询--人才引荐
    onSubmit() {
      this.getRecommendList();
    },
    //查询--岗位管理
    onSubmit2() {
      this.getPositionList();
    },
    //批量删除信息-人才引荐
    async onDelete() {
      if (this.ids.length == 0) {
        alert("请选择删除项!");
        return;
      }
      const { data: res } = await this.$http.post(
        "/recruitment_pc/deleteIntroduceByList",
        this.ids
      );
      if (res.success == true) {
        this.getRecommendList();
      }
    },
    //批量删除信息-岗位管理
    async onDelete2() {
      if (this.ids.length == 0) {
        alert("请选择删除项!");
        return;
      }
      const { data: res } = await this.$http.post(
        "/recruitment_pc/deleteRecruitementByIds",
        this.ids
      );
      console.log("多条", res);
      if (res.success == true) {
        this.getPositionList();
      }
    },
    //多选
    select(selection) {
      let a = [];
      selection.forEach(item => {
        a.push(item.id);
      });
      this.ids = a;
    },
    //全选
    selectAll(selection) {
      let a = [];
      selection.forEach(item => {
        a.push(item.id);
      });
      this.ids = a;
    },
    //多选
    userTableSelect(selection) {
      let a = [];
      selection.forEach(item => {
        a.push(item.id);
      });
      this.ids = a;
    },
    //全选
    userTableSelectAll(selection) {
      let a = [];
      selection.forEach(item => {
        a.push(item.id);
      });
      this.ids = a;
    },
    roleTableSelect(selection) {
      let a = [];
      selection.forEach(item => {
        a.push(item.id);
      });
      this.RoleTableForm.selectedIds = a;
    },
    //全选
    roleTableSelectAll(selection) {
      let a = [];
      selection.forEach(item => {
        a.push(item.id);
      });
      this.RoleTableForm.selectedIds = a;
    },
    userPatentTableSelect(selection) {
      let a = [];
      selection.forEach(item => {
        a.push(item.id);
      });
      this.userPanentExperienceEditForm.selectedIds = a;
    },
    //全选
    userPatentTableSelectAll(selection) {
      let a = [];
      selection.forEach(item => {
        a.push(item.id);
      });
      this.userPanentExperienceEditForm.selectedIds = a;
    },
    userProjectTableSelect(selection) {
      let a = [];
      selection.forEach(item => {
        a.push(item.id);
      });
      this.userProjectExperienceEditForm.selectedIds = a;
    },
    //全选
    userProjectTableSelectAll(selection) {
      let a = [];
      selection.forEach(item => {
        a.push(item.id);
      });
      this.userProjectExperienceEditForm.selectedIds = a;
    },
    //查看人才引荐
    async handleClick(row) {
      this.dialogVisible = true;
      // 获取应聘信息详情
      const { data: res } = await this.$http.get(
        "/recruitment_pc/qryIntroducePcById",
        { params: { id: row.id } }
      );
      this.menuForm = res.data;
      if (row.kind == 0) {
        //内部
        this.menuForm.kind = 0;
      } else {
        //外部
        this.menuForm.kind = 1;
      }
      this.menuForm.time = row.time;
      this.menuForm.edu = this.menuForm.edu == 1 ? "本科" : "大专";
    },
    //查看岗位管理
    async handleClick2(row) {
      this.postm_id = row.id;
      this.dialogVisible2 = true;
      this.isAdd = false;
      this.isModify = false;
      //获取详细信息
      const { data: res } = await this.$http.get(
        "/recruitment_pc/qryRecruitmentById",
        { params: { id: row.id } }
      );
      console.log("22222", res);
      if (res.data.kind == 0) {
        res.data.kind = "内部";
      } else {
        res.data.kind = "外部";
      }
      res.data.dddeptName = row.deptName;
      res.data.svalue3 = row.switchValue;
      if (res.data.edu == 0) {
        res.data.edu = "大专";
      } else if (res.data.edu == 1) {
        res.data.edu = "本科";
      } else if (res.data.edu == 2) {
        res.data.edu = "硕士";
      } else {
        res.data.edu = "博士";
      }
      this.menuForm2 = res.data;
    },
    closeDialog2() {
      this.dialogVisible2 = false;
    },
    close(val) {
      this.dialogVisible = val;
    },
    //删除单条信息-人才引荐
    async open(row) {
      // console.log("shanchu",row);
      this.id = row.id;
      const { data: res } = await this.$http.get(
        "/recruitment_pc/deleteByIntroduceId",
        { params: { id: this.id } }
      );
      if (res.data == 1) {
        this.getRecommendList();
      }
    },
    //删除单条信息-岗位管理
    async open2(row) {
      this.id = row.id;
      const { data: res } = await this.$http.get(
        "/recruitment_pc/deleteRecruitmentById",
        { params: { id: this.id } }
      );
      console.log(9999, res);
      if (res.data == 1) {
        this.getPositionList();
      }
    },
    //新增岗位管理
    addInfo() {
      this.isAdd = true;
      this.isModify = false;
      this.dialogVisible2 = true;
      this.menuForm2 = {};
    },
    //修改岗位管理
    modify(params) {
      this.postm_id = params.id;
      this.handleClick2(params);
      this.isModify = true;
      this.isAdd = false;
      this.dialogVisible2 = true;
    },
    //得到部门id
    async getDeptInfo() {
      const { data: res } = await this.$http.get("course/qryDeptMessage", {
        params: { id: "" }
      });
      this.deptTypes = res.data;
    },
    //控制switch开关
    changeswitvh(params) {
      console.log("开关", params);
      if (params) {
        this.menuForm2.recommended = 1;
      } else {
        this.menuForm2.recommended = 0;
      }
    },
    // 提交信息
    async submitInfo() {
      //是新增
      if (this.isAdd) {
        let params3 = {
          name: this.menuForm2.name,
          deptId: this.menuForm2.dddeptName,
          eSalary: this.menuForm2.eSalary,
          fSalary: this.menuForm2.fSalary,
          recommended: this.menuForm2.recommended,
          edu: this.menuForm2.edu,
          jobTime: this.menuForm2.jobTime,
          kind: this.menuForm2.kind,
          city: this.menuForm2.city,
          lightPoint: this.menuForm2.lightPoint,
          address: this.menuForm2.address,
          jobDuty: this.menuForm2.jobDuty,
          welfare: this.menuForm2.welfare
        };
        const { data: res } = await this.$http.post(
          "/recruitment_pc/insertRecruitment",
          params3
        );
        console.log("新增", res);
        // this.getPositionList()
      }
      //是修改
      if (this.isModify) {
        let params3 = {
          id: this.postm_id,
          name: this.menuForm2.name,
          deptId: this.menuForm2.deptName,
          eSalary: this.menuForm2.eSalary,
          fSalary: this.menuForm2.fSalary,
          recommended: this.value3,
          edu: this.menuForm2.edu,
          jobTime: this.menuForm2.jobTime,
          kind: this.menuForm2.kind,
          city: this.menuForm2.city,
          lightPoint: this.menuForm2.lightPoint,
          address: this.menuForm2.address,
          jobDuty: this.menuForm2.jobDuty,
          welfare: this.menuForm2.welfare
        };
        const { data: res } = await this.$http.post(
          "/recruitment_pc/updateRecruitment",
          params3
        );
        console.log("修改", res);
        // this.getPositionList()
      }
    },
    async userEditDialogtogger(tabName, data) {
      this.userEditDialog.isShow = true;
      this.userEditDialog.activeName = tabName;
      const { data: res1 } = await this.$http.get(
        "/archives/pc/getUser?userId=" + data.id
      );
      const { data: res2 } = await this.$http.get("/archives/pc/getRankName");
      const { data: res3 } = await this.$http.get("/archives/pc/getDeptName");
      const { data: res4 } = await this.$http.get(
        "/archives/pc/ui?pageNum=1&pageSize=10"
      );
      const { data: res5 } = await this.$http.get("/user/" + data.id);
      const { data: res6 } = await this.$http.get(
        "/tea_relation_status?userId=" + data.id
      );
      // const { data: res6 } = await this.$http.get("/archives/getPanentInfo");
      // const { data: res7 } = await this.$http.get("/getProject");

      this.userEditDialog.userId = data.id;
      this.getPanentToPage();
      this.getProjectToPage();
      this.getSixData();
      console.log("res1.data.userId", res1.data.userId);
      console.log("data.id", data.id);
      this.userTutorEditForm.flag =
        res6.data && res6.data.length > 0 ? true : false;
      this.userTutorEditForm.introduce =
        res6.data && res6.data.length > 0 ? res6.data[0].introduce : "";

      this.userEditDialog.userName = res1.data.userName;
      this.userDetilEditForm.userName = res1.data.userName;
      this.userDetilEditForm.gender = res1.data.gender;
      this.userDetilEditForm.phone = res1.data.phone;
      this.userDetilEditForm.IDCard = res1.data.IDCard;
      this.userDetilEditForm.birthday = res1.data.birthday;
      this.userDetilEditForm.certNo = res1.data.certNo;
      this.userDetilEditForm.sexType = res1.data.sexType;
      this.userDetilEditForm.mail = res1.data.mail;
      this.userDetilEditForm.classTime = res1.data.classTime; //
      this.userDetilEditForm.attendanceTime = res1.data.attendanceTime;
      this.userDetilEditForm.photo = res1.data.photo;
      this.userRoleEditForm.tableData = [];
      res5.data.roles.forEach(r => {
        if (
          !this.userRoleEditForm.name ||
          r.roleName.indexOf(this.userRoleEditForm.name) != -1
        ) {
          if (
            !this.userRoleEditForm.description ||
            r.description.indexOf(this.userRoleEditForm.description) != -1
          ) {
            this.userRoleEditForm.tableData.push(r);
          }
        }
      });

      this.userInfoEditForm.jobTitle = res1.data.jobTitle;
      this.userInfoEditForm.eduKind = res1.data.eduKind;
      this.userInfoEditForm.school = res1.data.school;
      this.userInfoEditForm.graTime = res1.data.graTime;
      this.userInfoEditForm.major = res1.data.major;
      this.userInfoEditForm.job = res1.data.job;
      this.userInfoEditForm.detentionTime = res1.data.detentionTime;
      this.userInfoEditForm.perForMance = res1.data.perForMances[0]
        ? res1.data.perForMances[0].perTime +
          res1.data.perForMances[0].introduce
        : "";
      this.userInfoEditForm.eduId = res1.data.eduId;
    },
    async userEditDialogTabClick(tabName) {
      this.userEditDialog.activeName = tabName.name;
    },
    async assignRoleToUser(isCreate, row) {
      const { data: res } = await this.$http.get(
        "/role/getRole?page=1&size=1000&name=&description=&createTime"
      );
      this.userRoleAddForm.roleSelectData = res.data.rows;
      this.userRoleAddForm.isCreate = isCreate;
      this.userRoleAddDetilShow = true;
      if (isCreate) {
        this.dialogName = "新建";
        this.userRoleAddForm.roleSelectedData = "";
        this.userRoleAddForm.roleId = "";
        this.userRoleAddForm.defaultRoleStr = "";
        this.userRoleAddForm.activeRoleStr = "";
      } else {
        this.dialogName = "查看";
        this.userRoleAddForm.roleSelectedData = row.id;
        this.userRoleAddFormRoleSelectChange(row.id);
      }
    },
    async getRolePage() {
      const { data: res } = await this.$http.get(
        "/role/getRole?page=" +
          this.RoleTableForm.page +
          "&size=" +
          this.RoleTableForm.size +
          "&name=" +
          this.RoleTableForm.name +
          "&description=" +
          this.RoleTableForm.description +
          "&createTime="
      );
      this.RoleTableForm.tableData = res.data.rows;
      this.RoleTableForm.totalCount = res.data.total;
    },
    async checkedDefaultPermissionChange(values) {
      this.roleEditDialogForm.defaultPermissionCheckedList = values;
    },
    async showAddRoleDialog() {
      this.getPermissions();
      this.roleEditDialog.isShow = true;
      this.roleEditDialog.isCreate = true;
      this.roleEditDialog.title = "角色新增";
      this.roleEditDialog.secondTitle = "录入角色信息";
      this.roleEditDialogForm.id = "";
      this.roleEditDialogForm.roleName = "";
      this.roleEditDialogForm.createTime = "";
      this.roleEditDialogForm.permissions = [];
      this.roleEditDialogForm.permissionCheckedList = [];
      this.roleEditDialogForm.permissionDefaultCheckedList = [1];
      this.roleEditDialogForm.description = "";
      this.roleEditDialogForm.defaultPermissionCheckedList = [];
      this.roleEditDialogForm.activePermissionCheckedList = [];
      this.roleEditDialogForm.permissionTreeCheckStrictly = false;
    },
    async showEditRoleDialog(id) {
      this.roleEditDialogForm.permissionTreeCheckStrictly = true;
      const { data: res } = await this.$http.get("/role/getRole/" + id);
      this.roleEditDialogForm.id = id;
      this.roleEditDialogForm.roleName = res.data.roleName;
      this.roleEditDialogForm.createTime = res.data.createTime;
      this.roleEditDialogForm.permissions = res.data.permissions;
      this.roleEditDialogForm.description = res.data.description;
      this.roleEditDialogForm.defaultPermissionCheckedList = [];
      this.roleEditDialogForm.activePermissionCheckedList = [];
      this.roleEditDialogForm.permissionCheckedList = [];
      this.roleEditDialogForm.permissionDefaultCheckedList = [];

      this.roleEditDialog.isShow = true;
      this.roleEditDialog.isCreate = false;
      this.roleEditDialog.title = "修改角色";
      this.roleEditDialog.secondTitle = "录入角色信息";

      let defaultPermissionCheckedList = [];
      let activePermissionCheckedList = [];
      let permissionDefaultCheckedList = [];
      // res.data.setMenu.forEach(permission => {
      //   if (
      //     defaultPermissionCheckedList.indexOf(permission.id) == -1 &&
      //     this.roleEditDialog.defaultPermissionList.findIndex(p => {
      //       return p.id == permission.id;
      //     }) != -1
      //   ) {
      //     defaultPermissionCheckedList.push(permission.id);
      //   }
      // });
      // res.data.setPoint.forEach(permission => {
      //   if (
      //     activePermissionCheckedList.indexOf(permission.id) == -1 &&
      //     this.roleEditDialog.activePermissionList.findIndex(p => {
      //       return p.id == permission.id;
      //     }) != -1
      //   ) {
      //     activePermissionCheckedList.push(permission.id);
      //   }
      // });

      // res.data.setMenu.forEach(permission => {
      //   if (
      //     this.roleEditDialogForm.permissionDefaultCheckedList.indexOf(
      //       permission.id
      //     ) == -1
      //   ) {
      //     this.roleEditDialogForm.permissionDefaultCheckedList.push(permission.id);
      //   }
      // });

      res.data.setPoint.forEach(permission => {
        if (permissionDefaultCheckedList.indexOf(permission.id) == -1) {
          permissionDefaultCheckedList.push(permission.id);
        }
      });
      if (permissionDefaultCheckedList.indexOf(1) == -1) {
        permissionDefaultCheckedList.push(1);
      }
      // res.data.setMenu.forEach(permission => {
      //   if (
      //     this.roleEditDialogForm.permissionCheckedList.indexOf(
      //       permission.id
      //     ) == -1
      //   ) {
      //     this.roleEditDialogForm.permissionCheckedList.push(permission.id);
      //   }
      // });
      res.data.setPoint.forEach(permission => {
        if (
          this.roleEditDialogForm.permissionCheckedList.indexOf(
            permission.id
          ) == -1
        ) {
          this.roleEditDialogForm.permissionCheckedList.push(permission.id);
        }
      });
      if (this.$refs.roleEditDialogFormPermissionTree) {
        this.$refs.roleEditDialogFormPermissionTree.setCheckedKeys(
          permissionDefaultCheckedList
        );
      } else {
        this.roleEditDialogForm.permissionDefaultCheckedList = permissionDefaultCheckedList;
      }
    },
    async checkedPermissionChange(value) {
      console.log("checkedPermissionChange", value);
    },
    async checkedActivePermissionChange(value) {
      this.roleEditDialogForm.activePermissionCheckedList = value;
    },
    async getPermissions() {
      this.roleEditDialogForm.permissionData = [];
      const { data: res } = await this.$http.get(
        "/permissions/getPermissions?pageNum=1&pageSize=1000"
      );
      // debugger;
      let permissionData = [];

      permissionData = this.setPermissionTree(res.data, 0);
      permissionData.map(p => {
        p.childrens = this.setPermissionTree(res.data, p.id);
        p.childrens.map(_p => {
          _p.childrens = this.setPermissionTree(res.data, _p.id);
        });
      });
      this.roleEditDialogForm.permissionData = permissionData;
      this.roleEditDialogForm.permissions = res.data;
      // this.roleEditDialog.defaultPermissionList = [];
      // this.roleEditDialog.activePermissionList = [];
      // res.data.rows.forEach(role => {
      //   if (role.type === "1") {
      //     this.roleEditDialog.defaultPermissionList.push(role);
      //   } else if (role.type === "2") {
      //     this.roleEditDialog.activePermissionList.push(role);
      //   }
      // });
    },
    setPermissionTree(data, id) {
      const result = [];
      data.forEach(d => {
        if (d.pid == id) {
          result.push(d);
        }
      });
      return result;
    },
    async submitRoleEditDialogForm() {
      if (!this.roleEditDialogForm.roleName) {
        this.$alert("请输入角色名称", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.roleEditDialogForm.createTime) {
        this.$alert("请选择创建时间", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      // if (this.roleEditDialogForm.defaultPermissionCheckedList.length < 1) {
      //   this.$alert("请选择基础权限", "提示", {
      //     confirmButtonText: "确定",
      //     type: "warning"
      //   });
      //   return;
      // }
      // if (this.roleEditDialogForm.activePermissionCheckedList.length < 1) {
      //   this.$alert("请选择操作权限", "提示", {
      //     confirmButtonText: "确定",
      //     type: "warning"
      //   });
      //   return;
      // }
      if (this.roleEditDialogForm.permissionCheckedList.length < 1) {
        this.$alert("请选择权限", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }

      if (this.roleEditDialogForm.permissionCheckedList.indexOf(1) == -1) {
        this.roleEditDialogForm.permissionCheckedList.push(1);
      }

      this.roleEditDialogForm.permissionCheckedList.forEach((p, index) => {
        this.roleEditDialogForm.permissionCheckedList[index] = { id: p };
      });

      let url = "";
      const submitData = {
        roleName: this.roleEditDialogForm.roleName,
        description: this.roleEditDialogForm.description,
        createTime: this.timeFormat(
          new Date(this.roleEditDialogForm.createTime),
          "yyyy-mm-dd hh:MM:ss"
        ),
        permissions: this.roleEditDialogForm.permissionCheckedList
      };
      // this.roleEditDialogForm.defaultPermissionCheckedList.forEach(
      //   permission => {
      //     submitData.permissions.push({ id: permission });
      //   }
      // );
      // this.roleEditDialogForm.activePermissionCheckedList.forEach(
      //   permission => {
      //     submitData.permissions.push({ id: permission });
      //   }
      // );

      if (this.roleEditDialog.isCreate) {
        url = "/role/addRole";
        const { data: res } = await this.$http.post(url, submitData);
        // if(res.success){
        //   this.roleEditDialog.isShow = false;
        // }
        this.roleEditDialog.isShow = false;
        this.getRolePage();
      } else {
        url = "/role/updateRole";
        submitData.id = this.roleEditDialogForm.id;
        this.$http.put(url, submitData).then(() => {
          this.roleEditDialog.isShow = false;
          this.getRolePage();
        });
      }
    },
    async userRoleAddFormRoleSelectChange(value) {
      this.userRoleAddForm.roleSelectedData = value;
      var selection = this.userRoleAddForm.roleSelectData.find(data => {
        return data.id === value;
      });
      this.userRoleAddForm.roleId = selection.id;
      this.userRoleAddForm.defaultRoleStr = selection.menu.join("  ");
      this.userRoleAddForm.activeRoleStr = selection.point.join("  ");
      console.log(
        "userRoleAddFormRoleSelectChange",
        this.userRoleAddForm.roleSelectedData
      );
    },
    async userRoleAddDetilSubmit() {
      const roles = [];
      if (this.userRoleEditForm.isCreate) {
        this.userRoleEditForm.tableData.forEach(role => {
          roles.push(role.id);
        });
      } else {
        this.userRoleEditForm.tableData.forEach(role => {
          if (role.id != this.userRoleAddForm.roleSelectedData) {
            roles.push(role.id);
          }
        });
      }

      if (!this.userRoleAddForm.roleSelectedData) {
        this.$alert("请选择一个角色", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }

      this.$http
        .put("/assignRole", {
          userId: this.userEditDialog.userId,
          roleIds: [this.userRoleAddForm.roleSelectedData].concat(roles)
        })
        .then(res => {
          this.userRoleAddDetilShow = false;
          this.userEditDialogtogger("userRoleTab", {
            id: this.userEditDialog.userId
          });
        });
    },
    async userRoleAddDetilDelete(id) {
      const roles = [];
      this.userRoleEditForm.tableData.forEach(role => {
        if (role.id != id) {
          roles.push(role.id);
        }
      });
      this.$confirm("此操作将解除当前角色, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          this.$http
            .put("/assignRole", {
              userId: this.userEditDialog.userId,
              roleIds: roles
            })
            .then(res => {
              this.userRoleAddDetilShow = false;
              this.userEditDialogtogger("userRoleTab", {
                id: this.userEditDialog.userId
              });
            });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除"
          });
        });
    },
    async userProjectEditDialogShow(id, isCreate, row) {
      this.userProjectEditDialog.isCreate = isCreate;
      if (isCreate) {
        this.userProjectEditDialog.userId = this.userEditDialog.userId;
        this.userProjectEditDialog.projectName = "";
        this.userProjectEditDialog.projectLevel = "";
        this.userProjectEditDialog.projectStarttime = "";
        this.userProjectEditDialog.projectEndtime = "";
        this.userProjectEditDialog.projectPost = "";
        this.userProjectEditDialog.projectIntroduce = "";
        this.userProjectEditDialog.projectAchievement = "";
        this.dialogName = "增加";
      } else {
        this.userProjectEditDialog.id = id;
        this.userProjectEditDialog.userId = this.userEditDialog.userId;
        this.userProjectEditDialog.projectName = row.projectName || "";
        this.userProjectEditDialog.projectLevel = row.projectLevel || "";
        this.userProjectEditDialog.projectStarttime =
          row.projectStarttime || "";
        this.userProjectEditDialog.projectEndtime = row.projectEndtime || "";
        this.userProjectEditDialog.projectPost = row.projectPost || "";
        this.userProjectEditDialog.projectIntroduce =
          row.projectIntroduce || "";
        this.userProjectEditDialog.projectAchievement =
          row.projectAchievement || "";
        this.dialogName = "修改";
      }

      this.userProjectEditDialog.isShow = true;
    },
    async userProjectEditDialogSubmit() {
      if (!this.userProjectEditDialog.projectName) {
        this.$alert("请输入项目名称", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userProjectEditDialog.projectLevel) {
        this.$alert("请选择项目类别", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userProjectEditDialog.projectStarttime) {
        this.$alert("请选择开始时间", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userProjectEditDialog.projectEndtime) {
        this.$alert("请选择结束时间", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (
        new Date(this.userProjectEditDialog.projectStarttime) >
        new Date(this.userProjectEditDialog.projectEndtime)
      ) {
        this.$alert("开始时间不能晚于结束时间", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userProjectEditDialog.projectPost) {
        this.$alert("请选择项目职务", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userProjectEditDialog.projectIntroduce) {
        this.$alert("请填写项目简介", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userProjectEditDialog.projectAchievement) {
        this.$alert("请填写项目成果", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (this.userProjectEditDialog.isCreate) {
        const { data: res } = await this.$http.post("/archives/pc/addProject", {
          projectName: this.userProjectEditDialog.projectName,
          projectLevel: this.userProjectEditDialog.projectLevel,
          projectPost: this.userProjectEditDialog.projectPost,
          projectIntroduce: this.userProjectEditDialog.projectIntroduce,
          projectAchievement: this.userProjectEditDialog.projectAchievement,
          projectStarttime: this.userProjectEditDialog.projectStarttime,
          projectEndtime: this.userProjectEditDialog.projectEndtime,
          userId: this.userProjectEditDialog.userId
        });
        this.userProjectEditDialog.isShow = false;
        this.getProjectToPage();
      } else {
        this.$http
          .put("/archives/pc/updateProject", {
            id: this.userProjectEditDialog.id, //主键id
            projectName: this.userProjectEditDialog.projectName,
            projectLevel: this.userProjectEditDialog.projectLevel,
            projectPost: this.userProjectEditDialog.projectPost,
            projectIntroduce: this.userProjectEditDialog.projectIntroduce,
            projectAchievement: this.userProjectEditDialog.projectAchievement,
            projectStarttime: this.userProjectEditDialog.projectStarttime,
            projectEndtime: this.userProjectEditDialog.projectEndtime,
            userId: this.userProjectEditDialog.userId
          })
          .then(() => {
            this.userProjectEditDialog.isShow = false;
            this.getProjectToPage();
          });
      }
    },
    async userPatentEditDialogShow(id, isCreate, row) {
      this.userPatentEditDialog = {
        id: "",
        isCreate: false,
        userId: "",
        isShow: false,
        name: "",
        patentType: "",
        licenseTime: "",
        patentNumber: "",
        patentPost: "",
        patentPerson: "",
        patentInternalNumber: ""
      };
      this.userPatentEditDialog.id = id || "";
      this.userPatentEditDialog.userId = this.userEditDialog.userId || "";
      this.userPatentEditDialog.isShow = true;
      this.userPatentEditDialog.isCreate = isCreate;
      if (isCreate) {
        this.dialogName = "添加";
      } else {
        this.dialogName = "修改";
        this.userPatentEditDialog.name = row.name || "";
        this.userPatentEditDialog.patentType = row.patentType || "";
        this.userPatentEditDialog.licenseTime = row.licenseTime || "";
        this.userPatentEditDialog.patentNumber = row.patentNumber || "";
        this.userPatentEditDialog.patentPost = row.patentPost || "";
        this.userPatentEditDialog.patentPerson = row.patentPerson || "";
        // this.userPatentEditDialog.patentInternalNumber =
        //   row.patentInternalNumber || "";
      }
    },
    async userPatentEditDialogSubmit() {
      if (!this.userPatentEditDialog.name) {
        this.$alert("请填写专利名称", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userPatentEditDialog.patentType) {
        this.$alert("请选择专利类型", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userPatentEditDialog.licenseTime) {
        this.$alert("请选择授权日期", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userPatentEditDialog.patentNumber) {
        this.$alert("请输入提案号", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userPatentEditDialog.patentPost) {
        this.$alert("请输入参与角色", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userPatentEditDialog.patentPerson) {
        this.$alert("请输入专利权人", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      // if (!this.userPatentEditDialog.patentInternalNumber) {
      //   this.$alert("请输入内部编号", "提示", {
      //     confirmButtonText: "确定",
      //     type: "warning"
      //   });
      //   return;
      // }

      let url = "";
      if (this.userPatentEditDialog.isCreate) {
        url = "/archives/pc/addPatent";
        const { data: res } = await this.$http.post(url, {
          name: this.userPatentEditDialog.name,
          licenseTime: this.userPatentEditDialog.licenseTime,
          userId: this.userEditDialog.userId,
          patentType: this.userPatentEditDialog.patentType,
          patentNumber: this.userPatentEditDialog.patentNumber,
          patentPost: this.userPatentEditDialog.patentPost,
          patentPerson: this.userPatentEditDialog.patentPerson,
          // patentInternalNumber: this.userPatentEditDialog.patentInternalNumber
        });
        this.userPatentEditDialog.isShow = false;
        this.getPanentToPage();
      } else {
        url = "/archives/pc/updatePatent";
        this.$http
          .put(url, {
            id: this.userPatentEditDialog.id,
            name: this.userPatentEditDialog.name,
            licenseTime: this.userPatentEditDialog.licenseTime,
            userId: this.userEditDialog.userId,
            patentType: this.userPatentEditDialog.patentType,
            patentNumber: this.userPatentEditDialog.patentNumber,
            patentPost: this.userPatentEditDialog.patentPost,
            patentPerson: this.userPatentEditDialog.patentPerson,
            // patentInternalNumber: this.userPatentEditDialog.patentInternalNumber
          })
          .then(() => {
            this.userPatentEditDialog.isShow = false;
            this.getPanentToPage();
          });
      }
    },
    async getPanentToPage() {
      const { data: res } = await this.$http.get(
        "/archives/pc/getPanent?name=" +
          this.userPanentExperienceEditForm.name +
          "&type=" +
          this.userPanentExperienceEditForm.type +
          "&userId=" +
          this.userEditDialog.userId +
          "&pageNum=" +
          this.userPanentExperienceEditForm.pageIndex +
          "&pageSize=" +
          this.userPanentExperienceEditForm.pageSize
      );
      this.userPanentExperienceEditForm.tableDate = res.data.rankApprovals;
      this.userPanentExperienceEditForm.type = this.userPanentExperienceEditForm.type;
      this.userPanentExperienceEditForm.totalCount = res.data.total;
      this.userPanentExperienceEditForm.type = 1;
      this.userPanentExperienceEditForm.type = "";
    },
    async getProjectToPage() {
      const { data: res } = await this.$http.get(
        "/archives/pc/getProject?name=" +
          this.userProjectExperienceEditForm.name +
          "&type=" +
          this.userProjectExperienceEditForm.type +
          "&userId=" +
          this.userEditDialog.userId +
          "&pageNum=" +
          this.userProjectExperienceEditForm.pageIndex +
          "&pageSize=" +
          this.userProjectExperienceEditForm.pageSize
      );
      this.userProjectExperienceEditForm.tableDate = res.data.rankApprovals;
      this.userProjectExperienceEditForm.totalCount = res.data.total;
      this.userProjectExperienceEditForm.type = 1;
      this.userProjectExperienceEditForm.type = "";
    },
    async deleteUser(ids) {
      if (!ids || ids.length === 0) {
        return;
      }
      this.$confirm("此操作将永久删除用户, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          let queryStr = "";
          ids.forEach((id, index) => {
            if (index === 0) {
              queryStr += "?ids=" + id;
            } else {
              queryStr += "&ids=" + id;
            }
          });
          this.$http.delete("/archives/pc/deleteUser" + queryStr).then(() => {
            this.$message({
              type: "success",
              message: "删除成功!"
            });
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除"
          });
        });
    },
    async deleteRole(ids) {
      if (!ids || ids.length === 0) {
        return;
      }
      if (
        ids.indexOf(1) != -1 ||
        ids.indexOf(2) != -1 ||
        ids.indexOf("1") != -1 ||
        ids.indexOf("2") != -1
      ) {
        this.$alert("不可删除初始化角色", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      this.$confirm("此操作将永久删除该角色, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          let queryStr = "";
          ids.forEach((id, index) => {
            if (index === 0) {
              queryStr += "?ids=" + id;
            } else {
              queryStr += "&ids=" + id;
            }
          });
          this.$http.delete("/role/deleteRole" + queryStr).then(res => {
            if (res.data.success) {
              this.$message({
                type: "success",
                message: "删除成功!"
              });
            } else {
              this.$message({
                type: "warning",
                message: res.data.resultMsg
              });
            }

            this.getRolePage();
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除"
          });
        });
    },
    async deletePatent(ids) {
      if (!ids || ids.length === 0) {
        return;
      }
      this.$confirm("此操作将永久删除专利, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          let queryStr = "";
          ids.forEach((id, index) => {
            if (index === 0) {
              queryStr += "?ids=" + id;
            } else {
              queryStr += "&ids=" + id;
            }
          });
          this.$http.delete("/archives/pc/deletePatent" + queryStr).then(() => {
            this.$message({
              type: "success",
              message: "删除成功!"
            });
            this.getPanentToPage();
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除"
          });
        });
    },
    async deleteProject(ids) {
      if (!ids || ids.length === 0) {
        return;
      }
      this.$confirm("此操作将永久删除项目经验, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          let queryStr = "";
          ids.forEach((id, index) => {
            if (index === 0) {
              queryStr += "?ids=" + id;
            } else {
              queryStr += "&ids=" + id;
            }
          });
          this.$http
            .delete("/archives/pc/deleteProject" + queryStr)
            .then(() => {
              this.$message({
                type: "success",
                message: "删除成功!"
              });
              this.getProjectToPage();
            });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除"
          });
        });
    },
    dateFtt(date) {
      //author: meizz
      let fmt = "yyyy-MM-dd hh:mm:ss";
      let ret;
      let opt = {
        "y+": date.getFullYear().toString(), // 年
        "M+": (date.getMonth() + 1).toString(), // 月
        "d+": date.getDate().toString(), // 日
        "h+": date.getHours().toString(), // 时
        "m+": date.getMinutes().toString(), // 分
        "s+": date.getSeconds().toString() // 秒
        // 有其他格式化字符需求可以继续添加，必须转化成字符串
      };
      for (let k in opt) {
        ret = new RegExp("(" + k + ")").exec(fmt);
        if (ret) {
          fmt = fmt.replace(
            ret[1],
            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0")
          );
        }
      }
      return fmt;
    },
    saveUserData() {
      this.$http.put("/user/" + this.userEditDialog.userId, {
        deptId: this.userDetilEditForm.userId,
        id: this.userEditDialog.userId,
        mail: "",
        phone: "111111111111",
        photo: "",
        userId: "manager4499",
        username: "薛岩"
      });
    },
    updateUserDetail() {
      this.$http
        .put("/update_user_detail", {
          job: this.userInfoEditForm.job,
          educationId: this.userInfoEditForm.eduId,
          education: this.userInfoEditForm.eduKind,
          school: this.userInfoEditForm.school,
          graTime: this.userInfoEditForm.graTime,
          major: this.userInfoEditForm.major,
          userId: this.userEditDialog.userId
        })
        .then(() => {
          this.userEditDialog.isShow = false;
        });
    },
    updateUserTutor() {
      this.$http
        .put("/updateTeaRalation", {
          flag: this.userTutorEditForm.flag,
          userId: this.userEditDialog.userId,
          introduce: this.userTutorEditForm.introduce
        })
        .then(() => {
          this.userEditDialog.isShow = false;
        });
    },
    permissionLoadNode(node, resolve) {
      if (node.id == 0) {
        return;
      }
      this.$http
        .get("/permissions/getPermissions?pid=" + node.data.id)
        .then(res => {
          console.log("permissionLoadNode", node, res);
          resolve(res.data.data);
        })
        .catch(e => {
          resolve([]);
        });
    },
    permissionCheckChange(data, checked, indeterminate) {
      console.log(data, checked, indeterminate);
      if (checked || indeterminate) {
        if (
          this.roleEditDialogForm.permissionCheckedList.indexOf(data.id) != -1
        ) {
          return;
        }
        this.roleEditDialogForm.permissionCheckedList.push(data.id);
        this.roleEditDialogForm.permissions.forEach(p => {
          if (p.pid == data.id) {
            this.roleEditDialogForm.permissionCheckedList.push(p.id);
            this.roleEditDialogForm.permissions.forEach(_p => {
              if (_p.pid == p.id) {
                this.roleEditDialogForm.permissionCheckedList.push(_p.id);
              }
            });
          }
        });
      } else {
        this.roleEditDialogForm.permissionCheckedList.splice(
          this.roleEditDialogForm.permissionCheckedList.indexOf(data.id),
          1
        );
      }
    },
    timeFormat(time, fmStr) {
      const weekCN = "一二三四五六日";
      const weekEN = [
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday",
        "Saturday",
        "Sunday"
      ];

      let year = time.getFullYear();
      let month = time.getMonth() + 1;
      let day = time.getDate();
      let hours = time.getHours();
      let minutes = time.getMinutes();
      let seconds = time.getSeconds();
      let milliSeconds = time.getMilliseconds();
      let week = time.getDay();

      month = month >= 10 ? month : "0" + month;
      day = day >= 10 ? day : "0" + day;
      hours = hours >= 10 ? hours : "0" + hours;
      minutes = minutes >= 10 ? minutes : "0" + minutes;
      seconds = seconds >= 10 ? seconds : "0" + seconds;

      if (fmStr.indexOf("yyyy") !== -1) {
        fmStr = fmStr.replace("yyyy", year);
      } else {
        fmStr = fmStr.replace("yy", (year + "").slice(2));
      }
      fmStr = fmStr.replace("mm", month);
      fmStr = fmStr.replace("dd", day);
      fmStr = fmStr.replace("hh", hours);
      fmStr = fmStr.replace("MM", minutes);
      fmStr = fmStr.replace("ss", seconds);
      fmStr = fmStr.replace("SSS", milliSeconds);
      fmStr = fmStr.replace("W", weekCN[week - 1]);
      fmStr = fmStr.replace("ww", weekEN[week - 1]);
      fmStr = fmStr.replace("w", week);

      return fmStr;
    },
    handleRemove(file, fileList) {
      let id = file.id;
      this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          this.$http.get("/manage/deleteImage?id=" + id).then(res => {
            this.qryImageManageList();
          });
        })
        .catch(() => {});
      return false;
    },
    async qryImageManageList() {
      this.fileList = [];
      this.$http.get("/manage/qryImageManageList").then(res => {
        if (res.data.success) {
          res.data.data.map(item => {
            this.fileList.push({ url: item.filePath, id: item.id });
          });
          console.log(this.fileList);
        }
      });
    },
    async deleteBannerImg(id) {
      this.$confirm("此操作将删除该文件, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          this.$http.get("/manage/deleteImage?id=" + id).then(res => {
            this.qryImageManageList();
          });
        })
        .catch(() => {});
    },
    async getSixData() {
      const { data: res } = await this.$http.get(
        "/archives/pc/getSix?userId=" + this.userEditDialog.userId
      );
      if (res.data) {
        this.userSixAddForm.userId = this.userEditDialog.userId;
        this.userSixAddForm.id = res.data.id || "";
        this.userSixAddForm.acquisitionTime = res.data.acquisitionTime || "";
        this.userSixAddForm.certificateNumber =
          res.data.certificateNumber || "";
        this.userSixAddForm.sixSigmaGrade = res.data.sixSigmaGrade || "";
      } else {
        this.userSixAddForm.userId = this.userEditDialog.userId;
        this.userSixAddForm.id = "";
        this.userSixAddForm.acquisitionTime = "";
        this.userSixAddForm.certificateNumber = "";
        this.userSixAddForm.sixSigmaGrade = "";
      }

      this.userSixAddForm.gggg = 0;
      this.$forceUpdate();
    },
    async addUserSixData() {
      if (!this.userSixAddForm.acquisitionTime) {
        this.$alert("请填写获得日期", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userSixAddForm.certificateNumber) {
        this.$alert("请填写证书编号", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      if (!this.userSixAddForm.sixSigmaGrade) {
        this.$alert("请选择等级", "提示", {
          confirmButtonText: "确定",
          type: "warning"
        });
        return;
      }
      this.userSixAddForm.userId = this.userEditDialog.userId;
      this.userSixAddForm.acquisitionTime = this.timeFormat(
        new Date(this.userSixAddForm.acquisitionTime),
        "yyyy-mm-dd"
      );
      const { data: res } = await this.$http.put(
        "/archives/pc/updateSix",
        this.userSixAddForm
      );
      if (res.success) {
        this.getSixData();
        this.userEditDialog.isShow = false;
      }
    }
  },
  created() {
    this.getRecommendList(); //人才引荐管理
    // this.getPositionList(); // 岗位管理
    this.getRolePage();
    this.getPermissions();

    this.getDeptInfo();

    this.qryImageManageList();
  }
  // components: {
  //   Look: Look
  // }
};
</script>

<style lang="less" scoped>
.el-radio {
  margin-bottom: 20px;
}
.el-breadcrumb__inner {
  font-size: 18px;
  font-weight: 400;
  color: rgba(34, 34, 34, 1);
}
.postdec {
  background: rgba(255, 255, 255, 1);
  margin-bottom: 8px;
}
.recommendContainer {
  position: relative;
  background-color: #fff;
  margin-top: 4px;
  padding: 20px 0 0 30px;
}
.is-active {
  background-color: #fff !important;
}
.recommendContainer {
  padding-top: 0;
  padding-left: 15px;
  padding-right: 15px;
}
.barTop {
  margin-bottom: 10px;
}

.detailsTip {
  margin-top: -15px;
  margin-bottom: 10px;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  height: 38px;
  line-height: 38px;
  color: #4787e4ff;
}
.modi-icon .el-form-item__label:before {
  color: blue !important;
  margin-right: 25px !important;
}
.el-form-item {
  margin-bottom: 10px !important;
}
.el-form-item-t {
  margin-bottom: 5px;
}
/deep/.el-dialog__footer {
  text-align: center !important;
}
.login-info-box {
  position: absolute;
  top: 8px;
  right: 15px;
}
.picture {
  width: 25px;
  height: 25px;
  margin-right: 10px;
  border-radius: 50%;
  background-color: antiquewhite;
}
.login-info {
  p {
    line-height: 15px;
    font-size: 13px;
    font-weight: 300;
    color: rgba(102, 102, 102, 1);
  }
}
.modi-icon .el-form-item__label:before {
  margin-right: 0px !important;
}
.greyRow {
  background-color: #f7f7f7 !important;
  border-bottom: 13px solid #fff;
}

.recommendContainer {
  font-family: "Microsoft YaHei";
  .el-table td,
  .el-table th.is-leaf {
    border-bottom: 13px solid #fff;
  }
}
.underline {
  text-decoration: underline;
  span {
    text-decoration: underline;
  }
}
.strong th > .cell {
  font-weight: 700;
}
/* .el-dialog__headerbtn {
  display: none;
} */

.el-dialog__header {
  padding: 20px;
}
.el-dialog__headerbtn {
  display: none;
}
.el-tabs__content {
  padding: 15px;
}
.system-contorl-tabs[data-v-e56af498] .el-tabs__nav-wrap {
  padding: 0px 15px;
}
.init-label.is-required:not(.is-no-asterisk)
  > .el-form-item__label:before:before {
  content: "*";
  color: #f56c6c;
  margin-right: 4px;
}
.el-table__body .cell {
  opacity: 0.7;
}

.system-contorl-tabs {
  padding: 0px 15px;
}
.el-dialog__headerbtn {
  top: 8px;
}
</style>
